Representing colors using 24-bit RGB values
Some API commands, such as PlaceText, allow you to represent colors using 24-bit RGB values instead of using the default list of 16 colors.
The number assigned to color attributes is calculated using the red, green, and blue components of the color you want, according to the following formula:
RGB = R*65536 + G*256 + B
where RRR, GGG, and BBB are numbers from 0 to 255 assigned to the red, green, and blue colors.
The following chart lists the values for the colors available through the Imagenation user interface:
|
Color |
R, G, B |
24-bit value |
|
background |
0, 0, 0 |
0 |
|
blue |
0, 0, 255 |
255 |
|
cyan |
0, 255, 255 |
65535 |
|
red |
255, 0, 0 |
16711680 |
|
yellow |
255, 255, 0 |
16776960 |
|
green |
0, 255, 0 |
65280 |
|
magenta |
255, 0, 255 |
16711935 |
|
gray |
194, 194, 194 |
12763842 |
|
dark blue |
0, 0, 127 |
127 |
|
dark cyan |
0, 127, 127 |
32639 |
|
dark red |
127, 0, 0 |
8323072 |
|
dark yellow |
127, 127, 0 |
8355584 |
|
dark green |
0, 127, 0 |
32512 |
|
dark magenta |
127, 0, 127 |
8323199 |
|
dark gray |
127, 127, 127 |
8355711 |
|
foreground |
255, 255, 255 |
16777215 |