Re: ColorsTooClose Routine



Hi Tiger,

Is there any 3rd party routine out there that can check if 2 Color are
too close to eachother?

If you have Raize Components, the RzCommon unit has several color-related
functions and procedures:

procedure ColorToHSL( C: TColor; var H, S, L: Byte );
function ColorHue( C: TColor ): Byte;
function ColorSaturation( C: TColor ): Byte;
function ColorLuminance( C: TColor ): Byte;
function HSLtoColor( H, S, L: Byte ): TColor;
function DarkerColor( C: TColor; Adjustment: Byte ): TColor;
function LighterColor( C: TColor; Adjustment: Byte ): TColor;
function AdjustColor( C: TColor; Adjustment: Integer ): TColor;
function BlendColors( ForeColor, BackColor: TColor; Alpha: Byte ): TColor;
function ColorsTooClose( ForeColor, BackColor: TColor ): Boolean;
function ComplementaryColor( C: TColor ): TColor; overload;
function ComplementaryColor( C: TColor; Luminance: Byte ): TColor; overload;

You can find more information on Raize Components from our website:
http://www.raize.com/DevTools/RzComps

Ray


.