Next Previous Contents

3.169 tgi_getcolor

Function

Return the current drawing color.

Header

tgi.h

Declaration

unsigned char __fastcall__ tgi_getcolor (void);

Description

The actual color is an index to a palette. During tgi_init you will get a default palette. The number of colors depend on the platform. All platforms recognize at least COLOR_BLACK and COLOR_WHITE. But some platforms have many more predefined colors. If you paint using COLOR_GREEN and then you change the green of the palette to blue using tgi_setpalette then after this painting in COLOR_GREEN will actually be blue.

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

color = tgi_getcolor();


Next Previous Contents