[Overview][Procedures and functions][Index] Reference for unit 'fpg_ColorMapping' (#fpgui)

RGBToHSV

Map RGB colorspace to HSV colorspace.

Declaration

Source position: fpg_colormapping.pas line 35

procedure RGBToHSV(

  C: TfpgColor;

  out Hue: LongInt;

  out Saturation: double;

  out Value: double

);

Description

This function converts a RGB (Red, Green, Blue) colorspace value to HSV (Hue, Saturation, Value) colorspace. The parameters have specific value ranges as listed below.

Hue
The Hue range is from 0 - 1535. In that range, the primary colors are mapped to the following values. Red = 0. Green = 512 and Blue = 1024.
Saturation
The Saturation value range is from 0.0 - 1.0. Grey (no color) = 0. Maximum color = 1.0.
Value
The Value value range is from 0.0 to 1.0. Black being 0 and maximum brightness being 1.0.

Documentation generated on: 2012-01-26