FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
178
Copyright © Bridgetek Limited
5.27
CMD_FGCOLOR - set the foreground color
C prototype
void cmd_fgcolor( uint32_t c );
Parameters
c
New foreground color, as a 24-bit RGB number. Red is the most significant 8
bits, blue is the least. So 0xff0000 is bright red. Foreground color is applicable
for things that the user can move such as handles and buttons
("affordances").
Command layout
+0
CMD_FGCOLOR(0xffffff0a)
+4
C
Examples
The top scrollbar uses the default foreground color, the others with a changed color:
cmd_scrollbar(20, 30, 120, 8, 0, 10, 40,
100);
cmd_fgcolor(0x703800);
cmd_scrollbar(20, 60, 120, 8, 0, 30, 40,
100);
cmd_fgcolor(0x387000);
cmd_scrollbar(20, 90, 120, 8, 0, 50, 40,
100);