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...")
 
 
Line 1: Line 1:
 
==Definition==
 
==Definition==
 
<source lang="scar" lines="false">
 
<source lang="scar" lines="false">
procedure RGBtoXYZ(R, G, B: Integer; var X, Y, Z: Extended);
+
procedure RGBToXYZ(R, G, B: Integer; var X, Y, Z: Extended);
 
</source>
 
</source>
  
Line 16: Line 16:
  
 
begin
 
begin
   RGBtoXYZ(0, 255, 0, X, Y, Z);
+
   RGBToXYZ(0, 255, 0, X, Y, Z);
 
   WriteLn(FloatToStr(X) + ';' + FloatToStr(Y) + ';' + FloatToStr(Z));
 
   WriteLn(FloatToStr(X) + ';' + FloatToStr(Y) + ';' + FloatToStr(Z));
 
end.
 
end.

Latest revision as of 10:07, 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