PgRedValue, PgGreenValue, PgBlueValue

PgRedValue, PgGreenValue, PgBlueValue — indicate color strength.

Syntax

PgRedValue(color)
PgGreenValue(color)
PgBlueValue(color)

		

Arguments

color

A 24-bit color number usually held as a hexadecimal number between 0x000000 (black) and 0xffffff (white).

Returns

A numeric representation of the red, green, or blue portion of the color.

Description

The return value is a number between 0x00 and 0xff (0-255 decimal) indicating the strength of the blue, red, or green portion of the color. In Photon, colors are held as 24-bit numbers. The most common representation of these numbers is a hex number of the form: 0xrrggbb where rr is a hex value of red, gg is the hex value of green, and bb is the hex value of blue.

Example

Gamma> color = PgRGB(77,0,128);
0x4d0080
Gamma> PgBlueValue(color);
0x80
Gamma> PgRedValue(color);
0x4d
Gamma> PgGreenValue(color);
0x0
		

See Also

PgRGB, PgCMY, PgGrayValue, PgHSV

and in Photon documentation: PgRedValue, PgGreenValue, PgBlueValue.