[Previous] [Contents] [Index] [Next]

PgColor_t

Composite color value

Synopsis:

unsigned long PgColor_t;

Description:

The PgColor_t type definition describes a composite color value. The lowest 8 bits contain the blue value, the next 8 bits contain the green value, and the next 8 bits after that the red value:

Reserved Red Green Blue
0000 0000 rrrr rrrr gggg gggg bbbb bbbb

At least the following colors are defined in <photon/Pg.h>:

Pg_BLACK
Pg_DGRAY
Pg_MGRAY
Pg_GRAY
Pg_WHITE
Pg_RED
Pg_GREEN
Pg_BLUE
Pg_YELLOW
Pg_MAGENTA
Pg_CYAN
Pg_DGREEN
Pg_DCYAN
Pg_DBLUE
Pg_BROWN
Pg_PURPLE
Pg_CELIDON

The following colors are also defined in <photon/Pg.h>:

Pg_DEVICE_COLOR
Interprets up to the least significant 24 bits as the value to put into video memory.
Note: This facility depends on the video hardware, and behaves differently depending on the graphics driver.

Pg_INVERT_COLOR
Use with PgSetDrawMode(Pg_DRAWMODE_XOR) for high visibility XOR drawing.
Pg_MIX_COLOR
OR with color to enable color mixing.
Pg_TRANSPARENT
Subsequent draw events won't be rendered.

We've defined the following colors for compatibility with standard VGA colors:

Pg_VGA0
Pg_VGA1
Pg_VGA2
Pg_VGA3
Pg_VGA4
Pg_VGA5
Pg_VGA6
Pg_VGA7
Pg_VGA8
Pg_VGA9
Pg_VGAA
Pg_VGAB
Pg_VGAC
Pg_VGAD
Pg_VGAE
Pg_VGAF

Here are samples of the standard colors:

Color samples

Classification:

Photon

See also:

PgBlueValue(), PgCMY(), PgColorHSV_t, PgGreenValue(), PgHSV2RGB(), PgRedValue(), PgRGB(), PgRGB2HSV(), PgSetFillColor(), PgSetFillDither(), PgSetStrokeColor(), PgSetStrokeDither(), PgSetTextColor(), PgSetTextDither()

"Color" in the Raw Drawing and Animation chapter of the Photon Programmer's Guide


[Previous] [Contents] [Index] [Next]