Previous: The Color Registry, Up: Colors [Contents][Index]
The RGB24 encoding encodes each color as a triplet of color beans, each beam indicating a level of red, green and blue respectively.
Types are provided for both the color beams, and the triplets:
type RGB24_Color_Beam = uint<8>; type RGB24_Color = RGB24_Color_Beam[3];
The indexes RGB24_RED
, RGB24_GREEN
and RGB24_BLUE
can be used to access to a specific beam of a given color:
(poke) rgb24_color[color_tomato][RGB24_GREEN] 99UB
The rgb24 pickle also provides a table associating poke
standard colors (see The Color Registry) with their RGB24
encodings. Once the pickle is loaded, this table is available in the
variable rgb24_color
. The table is to be indexed by color
codes:
(poke) load rgb24 (poke) rgb24_color[color_tomato] [255UB,99UB,71UB]