PgRGB

PgRGB — represents colors as combinations of red, green, and blue.

Syntax

PgRGB (red, green, blue)

		

Arguments

red

A number 0-255 decimal (0x00-0xff hex) representing the red component of the color.

green

A number 0-255 decimal (0x00-0xff hex) representing the green component of the color.

blue

A number 0-255 decimal (0x00-0xff hex) representing the blue component of the color.

Returns

A 24-bit color in the range 0x0 - 0xffffff that represents the combination of the passed args using the RGB color model.

Description

The RGB color model is the most familiar since it uses additive color combinations. As it is based on light, the lowest value is (0,0,0), or black (no light, no color); and the highest value is (255,255,255), or white (a combination of all colors).

Example

Gamma> WHITE = PgRGB(255,255,255);
0xffffff
Gamma> YELLOW = PgRGB(0,255,255);
0xffff
Gamma> ORANGE = PgRGB(255,165,0);
0xffa500
Gamma> RED = PgRGB(255,0,0);
0xff0000
Gamma> MAGENTA = PgRGB(255,0,255);
0xff00ff
Gamma> BLUE = PgRGB(0,0,255);
0xff
Gamma> GREEN = PgRGB(0,255,0);
0xff00
Gamma> BLACK = PgRGB(0,0,0);
0x0
		

See Also

PgCMY, PgHSV, PgRedValue, PgBlueValue, PgGreenValue

and in Photon documentation: PgRGB.