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

PgRGB()

Convert red, green, and blue values to composite color format

Synopsis:

PgColor_t PgRGB( int R, int G, int B );

Description:

This macro converts red, green, and blue values into a composite color value (a PgColor_t type). The values for red, green, and blue range from 0 to 255. If you set all three arguments to 0, the color is black; if you set all three to 255, the color is white.

Examples:

Color RGB value
Black PgRGB( 0, 0, 0 );
White PgRGB( 255, 255, 255 );
Red PgRGB( 255, 0, 0 );
Green PgRGB( 0, 255, 0 );
Blue PgRGB( 0, 0, 255 );
Orange PgRGB( 255, 165, 0 );
Slate Blue PgRGB( 80, 95, 134 );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgBlueValue(), PgCMY(), PgGreenValue(), PgHSV(), PgRedValue(), PgSetFillColor(), PgSetFillDither()


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