Next Previous Contents

3.219 tgi_getcolorcount

Function

Get the number of available colors.

Header

tgi.h

Declaration

unsigned char tgi_getcolorcount (void);

Description

Tgi platforms use indexed color palettes. This function returns the number of entries we can use in the palette.

Availability

cc65

See also

Other tgi functions

Example

if (tgi_getcolorcount() == 2) {
  printf("Only monochrome graphics is supported\n");
}


Next Previous Contents