Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 2 - Color Picker Manager Reference /
Constants and Data Types

HSL Color Structure

The HSLColor structure contains a color's hue, saturation, and lightness values. Your application can use an HSLColor structure to specify a color in a PMColor structure. For example, your application supplies a PMColor structure (page 2-15) in a color picker parameter block (page 2-20) that it passes to the PickColor function (page 2-35). Note that the standard HLS order is altered to HSL.

struct HSLColor {
   SmallFract hue;   /* Fraction of circle, red at 0 */
   SmallFract saturation;/* 0-1, 0 for gray, 1 for pure color */
   SmallFract lightness;/* 0-1, 0 for black, 1 for white */
typedef struct HSLColor HSLColor;
Field Description
The SmallFract value (page 2-33) for the hue.
The SmallFract value for the saturation, where 1 is full color.
The SmallFract value for lightness, where 1 is full white.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996