【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.6.19 HSLtoRGB
Contents
Description
convert HSL color to RGB
Syntax
DWORD HSLtoRGB( double hue, double sat, double lum )
Parameters
- hue
- [input] Hue between 0 and 1
- sat
- [input] Saturation between 0 and 1
- lum
- [input] Lightness between 0 and 1
Return
RGB value
Examples
EX1
void hsl2rgb_ex1(int hDeg, int sPercent, int lPercent) { double hh = hDeg/360.; double ss = sPercent/100.; double ll = lPercent/100.; DWORD dw = HSLtoRGB(hh, ss, ll); int nRed = GetRValue(dw); int nGreen = GetGValue(dw); int nBlue = GetBValue(dw); printf("%d %d %d\n", nRed, nGreen, nBlue); }
Remark
See Also
Header to Included
origin.h