Thema: Delphi Aero color

Einzelnen Beitrag anzeigen

Namenloser

Registriert seit: 7. Jun 2006
Ort: Karlsruhe
3.724 Beiträge
 
FreePascal / Lazarus
 
#5

AW: Aero color

  Alt 18. Jul 2012, 11:57
Why are you adding the original value?

Try this:
Delphi-Quellcode:
if A <> 0 then
begin
  R := Clamp(255*R div A, 0, 255);
  G := Clamp(255*G div A, 0, 255);
  B := Clamp(255*B div A, 0, 255);
end;
[edit]
Btw @Medium: The order used by this function is in fact ARGB: MSDN: “The color format of the value is 0xAARRGGBB”
[/edit]

Geändert von Namenloser (18. Jul 2012 um 12:09 Uhr)
  Mit Zitat antworten Zitat