CT_LUMINANCE

The CT_LUMINANCE function calculates the luminance of colors. The function returns an array containing the luminance values of the specified colors. If the R , G , and B parameters are not specified, or if R is of integer, byte or long type, the result is a longword array with the same number of elements as the input arguments. Otherwise, the result is a floating-point array with the same number of elements as the input arguments.

This routine is written in the IDL language. Its source code can be found in the file ct_luminance.pro in the lib subdirectory of the IDL distribution.

Calling Sequence

Result = CT_LUMINANCE( [R, G, B] )

Arguments

R

An array representing the red color table. If omitted, the color values from either the COLORS common block, or the current color table are used.

G

An array representing the green color table. This parameter is optional.

B

An array representing the blue color table. This parameter is optional.

Keywords

BRIGHT

Set this keyword to a named variable in which the array index of the brightest color is returned.

DARK

Set this keyword to a named variable in which the array index of the darkest color is returned.

READ_TABLES

Set this keyword, and don't specify the R, G , and B arguments, to read colors directly from the current colortable (using TVLCT, /GET) instead of using the COLORS common block.

See Also

GAMMA_CT , STRETCH