Thema: Delphi LMS color space <--> RGB

Einzelnen Beitrag anzeigen

WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#5

Re: LMS color space <--> RGB

  Alt 5. Jul 2012, 19:31
Yes, of course, my mistake

I have this:

Delphi-Quellcode:
var
  L, M, S: Double;
  XYZ: TXYZ;
begin
  XYZ := RGBToXYZ(RGB(130, 113, 222));
  L := (0.4002 * XYZ.X) + (0.7076 * XYZ.Y) + (-0.0808 * XYZ.Z);
  M := (-0.2263 * XYZ.X) + (1.1653 * XYZ.Y) + (0.0457 * XYZ.Z);
  S := (0 * XYZ.X) + (0 * XYZ.Y) + (0.9182 * XYZ.Z);
  ShowMessage(Format('%f %f %f', [L, M, S]));
  // 20,97 22,32 65,95
end;
Now I'll try make reverse transformation.
  Mit Zitat antworten Zitat