RGBToXYZ

From SCAR Divi Manual
Revision as of 02:08, 5 July 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> procedure RGBtoXYZ(R, G, B: Integer; var X, Y, Z: Extended); </source> ==Availability== SCAR Divi 3.00 > Current ==Description...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

procedure RGBtoXYZ(R, G, B: Integer; var X, Y, Z: Extended);

Availability

SCAR Divi 3.00 > Current

Description

Converts RGB values specified by R, G and B to color components within the XYZ color space and returns them in X, Y and Z. The resulting values can be converted back to RGB values using XYZToRGB.

Example

var
  X, Y, Z: Extended;

begin
  RGBtoXYZ(0, 255, 0, X, Y, Z);
  WriteLn(FloatToStr(X) + ';' + FloatToStr(Y) + ';' + FloatToStr(Z));
end.

Output:

35,76;71,52;11,92

See Also