GetForeColor
#include <Quickdraw.h> Color Quickdraw
RGBColor *color ; current red, green, blue components GetForeColor is used to obtain the red, green, and blue complements of the foreground color in the current port.
color is the address of either the rgbFgColor field or the global variable QDColors, depending on whether the current port is a grafPort or a
cGrafPort.
Notes : GetForeColor works regardless of whether the current port is a grafPort
or a cGrafPort. The difference is that for CGrafPort, the value comes from global variable QDColors. In turn, QDColors is a pointer to a table where
Quickdraw colors are stored as follows:
Value Color Red Green Blue
0 black 0x0000 0x0000 0x0000
1 yellow 0xFC00 0xF37D 0x052F
2 magenta 0xF2D7 0x0856 0x84EC
3 red 0xDD6B 0x08C2 0x06A2
4 cyan 0x0241 0xAB54 0xEAFF
5 green 0x0000 0x8000 0x11B0
6 blue 0x0000 0x0000 0xD400
7 white 0xFFFF 0xFFFF 0xFFFF