PgGrayValue

PgGrayValue — converts a color to a gray-scale equivalent.

Syntax

PgGrayValue (color)

		

Arguments

color

A 24-bit color in hexadecimal format in the range 0x000000 - 0xffffff.

Returns

An 8-bit (0x00 - 0xff hex) gray-scale representation of the color.

Description

This function converts a 24-bit color to an 8-bit gray-scale equivalent.

Example

Gamma> PgGrayValue (0xffffff);
0xff
Gamma> PgGrayValue (0x808080);
0x80
Gamma> PgGrayValue (PgRGB(255,0,0));
0x4c
		

See Also

PgGray

and in Photon documentation: PgGrayValue.