Colours

Windows API functions use a variable of type COLORREF to specify a drawing colour.

COLORREF Colour = 0x00rrggbb;
COLORREF Colour = RGB(red0to255, green0to255, blue0to255);
A specific colour, as defined by its red, green, and blue components. If the video adapter is in a "true colour" mode it will display the specified colour. Otherwise, if the video adapter is in a palette mode, the nearest colour from the standard VGA colour set (of 16 colours) will be displayed – even if you’ve added the specified colour to the palette.
COLORREF Colour = 0x0100nnnn;
COLORREF Colour = PALETTEINDEX(index);
A specific colour, as defined by its zero-based index into the palette.
COLORREF Colour = 0x02rrggbb;
COLORREF Colour = PALETTERGB(red0to255, green0to255, blue0to255);
A specific colour, as defined by its red, green, and blue components. If the video adapter is in a "true colour" mode it will display the specified colour. Otherwise, if the video adapter is in a palette mode, the nearest colour available in the palette will be displayed.