Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi TColor - Helligkeit und Sättigung (Get/Set) (https://www.delphipraxis.net/31883-tcolor-helligkeit-und-saettigung-get-set.html)

Keldorn 15. Okt 2004 18:55

Re: TColor - Helligkeit und Sättigung (Get/Set)
 
Hallo

ab D6 (meines wissens nach ;) )
Delphi-Quellcode:
 
uses graphutil;
diese unit ist nicht in der Hilfe erklärt und beinhaltet u.a. (einfach strg+auf unitnamen draufklicken):
Zitat:

Zitat von graphutil.pas
{ Calculates Hue, Luminance and Saturation for the clrRGB value }

procedure ColorRGBToHLS(clrRGB: COLORREF; var Hue, Luminance, Saturation: Word);

{ Calculates a color given Hue, Luminance and Saturation values }

function ColorHLSToRGB(Hue, Luminance, Saturation: Word): TColorRef;

{ Given a color and a luminance change "n" this routine returns a color whose
luminace has been changed accordingly. }

function ColorAdjustLuma(clrRGB: TColorRef; n: Integer; fScale: BOOL): TColorRef;

für Helligkeitsänderungen ist ColorAdjustLuma prima anzuwenden und ruft auch nur ColorRGBToHLS und ColorHLSToRGB auf.

Mfg Frank


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:21 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz