Difference between revisions of "ColorToXYZ"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure ColortoXYZ(Color: Integer; var X, Y, Z: Extended); </source> ==Availability== SCAR Divi 3.00 > Current ==Description...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
==Definition==
 
==Definition==
 
<source lang="scar" lines="false">
 
<source lang="scar" lines="false">
procedure ColortoXYZ(Color: Integer; var X, Y, Z: Extended);
+
procedure ColorToXYZ(Color: Integer; var X, Y, Z: Extended);
 
</source>
 
</source>
  
Line 16: Line 16:
  
 
begin
 
begin
   ColortoXYZ(123456, x, y, z);
+
   ColorToXYZ(123456, x, y, z);
 
   WriteLn(FloatToStr(x) + ';' + FloatToStr(y) + ';' + FloatToStr(z));
 
   WriteLn(FloatToStr(x) + ';' + FloatToStr(y) + ';' + FloatToStr(z));
 
end.
 
end.

Latest revision as of 10:06, 5 July 2011

Definition

procedure ColorToXYZ(Color: Integer; var X, Y, Z: Extended);

Availability

SCAR Divi 3.00 > Current

Description

Converts a given color value Color to XYZ values and returns them in X, Y and Z. The components can be joined back together into a color value using XYZtoColor.

Example

var
  x, y, z: Extended;

begin
  ColorToXYZ(123456, x, y, z);
  WriteLn(FloatToStr(x) + ';' + FloatToStr(y) + ';' + FloatToStr(z));
end.

Output:

29,316187412587;55,4848927242303;9,1932523901777

See Also