![]() |
![]()
| ![]() |
![]()
NAMEXmtHSLToRGB(), XmtRGBToHSL() - convert between the HSL and RGB color spaces.SYNOPSIS#include <Xmt/Color.h>
void XmtHSLToRGB(unsigned h, unsigned s, unsigned l, unsigned *r, unsigned *g, unsigned *b) void XmtRGBToHSL(unsigned r, unsigned g, unsigned b, unsigned *h, unsigned *s, unsigned *l) ARGUMENTS
DESCRIPTIONXmtHSLToRGB() converts a color specified in the HSL color space to the equivalent color in the RGB color space. XmtRGBToHSL() performs the opposite conversion-from the RGB color space to the HSL color space.In X, the r, g, and b components of an RGB color vary between 0 and 65535. As implemented by Xmt, the Hue of a HSL color is an angle between 0 and 359, and the Saturation and Lightness of a color vary between 0 and 100. Note that the h, s, and l arguments are unsigned, not float or double. See Chapter 6, Using Color, for more information on the HSL color space. SEE ALSOChapter 4, Using Color,XmtAllocColor(), XmtRegisterPixelConverter().
|