The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



RGBtoHSL


Unit: SDL_sdlcolors
Class: none
Declaration: procedure RGBtoHSL (r, g, b: integer; var Hue, Sat, Lum: double);

The function RGBtoHSL transforms a color defined in the RGB color space by the parameters r (red, valid range: 0..255), g (green, valid range: 0..255), and b (blue, valid range: 0..255) into the HSL color space. The variable parameters Hue, Sat, and Lum return the hue (0..360), the saturation (0..1), and the luminosity (0..1), respectively.



Last Update: 2019-Jul-19