Convert red, green, and blue values to composite color format
PgColor_t PgRGB( int R, int G, int B );
ph
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.
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 ); |
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PgARGB(), PgBlueValue(), PgColor_t, PgCMY(), PgGreenValue(), PgHSV(), PgRedValue(), PgSetFillColor(), PgSetStrokeColor(), PgSetTextColor()
“Color” in the Raw Drawing and Animation chapter of the Photon Programmer's Guide