Difference between revisions of "RGBToXYZ"

From SCAR Divi Manual
Jump to: navigation, search
(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...")
(No difference)

Revision as of 01:08, 5 July 2011

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