Thema: Delphi Color mixer

Einzelnen Beitrag anzeigen

WojTec

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

Re: Color mixer

  Alt 25. Mai 2012, 20:32
Oh, you've right, thanks

Ok, I'm trying make blender in HSL space and I did it:

Delphi-Quellcode:
// get both colors HSL values to HSL1 and HSL2

H := Round((MaxHue / 100) * AValue) * (HSL2[0] - HSL1[0]) shr 8 + HSL1[0];
S := Round((MaxSat / 100) * AValue) * (HSL2[1] - HSL1[1]) shr 8 + HSL1[1];
L := Round((MaxLum / 100) * AValue) * (HSL2[2] - HSL1[2]) shr 8 + HSL1[2];

// set result as TColor
This is working. Now 2 questions: this is working in CW mode (as you see on the image posted early), how to make it in CCW? And second one, how to get n colors form this gradient, like in you proposed in RGB mode?
  Mit Zitat antworten Zitat