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

PgCMY()

Convert cyan, magenta, and yellow values to composite color format

Synopsis:

PgColor_t PgCMY( int C, int M, int Y );

Description:

This macro converts cyan, magenta, and yellow values into a PgColor_t structure. It lets you approximate print-industry colors. The values for C, M, and Y range from 0 to 255. If you set all three arguments to 0, the color is white; if you set all three to 255, the color is black.

Returns:

A composite color value.

Examples:

Color Composite color value
Black PgCMY( 255, 255, 255 );
White PgCMY( 0, 0, 0 );
Red PgCMY( 0, 255, 255 );
Green PgCMY( 255, 0, 255 );
Blue PgCMY( 255, 255, 0 );
Orange PgCMY( 0, 90, 255 );
Slate Blue PgCMY( 175, 160, 121 );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgColor_t, PgBlueValue(), PgGreenValue(), PgHSV(), PgRedValue(), PgRGB(), PgSetFillColor(), PgSetFillDither()


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