21 Q3ColorRGB_Luminance

You can use the Q3ColorRGB_Luminance function to compute the luminance of a color.

float *Q3ColorRGB_Luminance (
const TQ3ColorRGB *color, 
float *luminance);
color An RGB color structure.
luminance On exit, the luminance of the specified color.

DESCRIPTION


The Q3ColorRGB_Luminance function returns, as its function result and in the luminance parameter, the luminance of the color specified by the color parameter. A color's luminance is computed using this formula:

luminance =
(0.30078125 color.r) + (0.58984375 color.g) + (0.109375 color.b)

DESCRIPTION

3D Graphics Programming with QuickDraw 3D - 18 OCT 1995

© Apple Computer, Inc.

Let us know what you think of these prototype pages.

Generated with Harlequin WebMaker