PgHSV

PgHSV — represents color by hue, saturation, and brightness.

Syntax

PgHSV (hue, saturation, value)

		

Arguments

hue

A numeric representation of the hue component (0-255 decimal, 0x00-0xff hex).

saturation

A numeric representation of the saturation component (0-255 decimal, 0x00-0xff hex).

value

A numeric representation of the value (often called brightness) component (0-255 decimal, 0x00-0xff hex).

Returns

A 24-bit color in the range 0x000000 - 0xffffff that is the numeric representation of the hue, saturation, and value (brightness).

Description

The hue, saturation, and brightness color system is another color model that is popular. The hue is the color, such as yellow, orange, purple, green, etc. The saturation is a range from white to the fully saturated color. The value (or brightness) is a range from black to the fully saturated color.

Example

Gamma> PgHSV(0,0,0);
0x00
Gamma> PgHSV(0,0,255);
0xffffff
Gamma> PgHSV(0,0,128) == PgRGB(128,128,128);
t
		

See Also

PgRGB, PgCMY

and in Photon documentation: PgHSV.