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....


Declaration:procedure RGBtoHSI (r, g, b: integer; var Hue, Sat, Intens: double);

The function RGBtoHSI 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 HSI color space. The variable parameters Hue, Sat, and Intens return the hue (0..360), the saturation (0..1), and the intensity (0..1), respectively.

Example: This procedure is used in the following example program (see for downloading the code): colorcalc

Last Update: 2014-Aug-13