PreviousNext
Help > REFERENCE OF THE BUILT-IN FUNCTIONS > User Interface and Graphics > gpattr
gpattr

Format:                                                                        

gpattr (int_Fcol, int_Bcol, int_scale);

Specify text attributes for the current font for gprint(). The first parameter defines the main font colour, the second parameters specifies the background colour, and the third parameter is the font scale.

When any of the colours is defined as negative number, it becomes transparent.

The colours are provided in 24-bit values that correspond to RGB:888 format. In many displays however, the colour is actually an 18-bit RGB value in bit format 6--:6--:6--, where the ‘’ bits don’t matter and are typically set in 0. Therefore, in an example, colour 0xAD237A will be the same as colour 0xAC2078, because the RGB bitmask of the first is 10101101:00100011:01111010, and that converted to 18-bit format takes the form 10101100:00100000:01111000.

The function has no effect in the console or on text-only displays.