Next Previous Contents

## 3.170 tgi_getcolorcount

> Function

>   Get the number of available colors.

> Header

>   `tgi.h`

> Declaration

>   `unsigned char __fastcall__ tgi_getcolorcount (void);`

> Description

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

> Limits

>   - The function is only available as fastcall function, so it may only be used in presence of a prototype.
> Availability

>   cc65

> See also

>   Other tgi functions

> Example

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

Next Previous Contents