Unit ColorMan

--------------------------------------------------- Colour Manager Copyright (r) by DreamFactory Version : 1.75 Author : William Yang Last Update 09 - Sep - 97 ---------------------------------------------------

Classes

Functions

AutoBW -
BrightenColor - Transfer Hexidecimal to Integer
CentreRGB -
ColorAdd -
Colorise - Convert the SC to Grey Color
ColorMinus -
ColorToGrey - Convert the BaseColor to the Grade of Adjust Darken Color

take the each percentage of r, g, b in the given color
CompareB -
CompareColor -
CompareG -
CompareR -
CorrectColor - Error RGB Color
DarkenColor - Convert the BaseColor to the Grade of Adjust Brighten Color
DeColor -
DeColorB - 16 Oct 1997
ERGB - Convert the SC to MC Color
HexToColor -
HexToInt - Transfer Hexidecimal to Color
InvertColor -
IsGreyColor - Misc A Whole BMP to One Color

------------------------------------------- | 0 |---|---|---|---| 255 | | Black White | -------------------------------------------
IsLightColor - Check if the Color is grey color
MergeColor - Correct the Wrong Color Byte
MergeColorExt - 10 July 1997
MiscBmpToColor - Misc A Number of Colors To One

This function is written after the MiscColor, because I thought the Variant Parameter Make the tranfering too slow.
MiscColor - Merge Two Color to One
MiscVBToColor -
QBColor - Common Used in Quick Basic
RGBAvg - Check if the Color is Light Color {Added 19-March-1997
SumRGB -
ToQBColor -

Types

Constants

Variables


Functions


function AutoBW(BGColor: TColor): TColor;


function BrightenColor(BaseColor: TColor; Adjust : Integer): TColor;

Transfer Hexidecimal to Integer

function CentreRGB(C : TColor; Percent : Integer) : TColor;


function ColorAdd(C1, C2 : TColor) : TColor;


function Colorise(SC, MC : TColor) : TColor;

Convert the SC to Grey Color

function ColorMinus(C1, C2 : TColor) : TColor;


function ColorToGrey(SC : TColor) : TColor;

Convert the BaseColor to the Grade of Adjust Darken Color

take the each percentage of r, g, b in the given color


function CompareB(C1, C2 : TColor) : Integer;


function CompareColor(C1, C2 : TColor) : Integer;


function CompareG(C1, C2 : TColor) : Integer;


function CompareR(C1, C2 : TColor) : Integer;


function CorrectColor(C : Single) : Integer;

Error RGB Color

function DarkenColor(BaseColor: TColor; Adjust : Integer): TColor;

Convert the BaseColor to the Grade of Adjust Brighten Color

procedure DeColor(Color: TColor; var R, G, B: Integer);


procedure DeColorB(Color: TColor; var R, G, B: Byte);

16 Oct 1997

function ERGB(R,G,B : Single) : TColor;

Convert the SC to MC Color

function HexToColor (Hex : String) : TColor;


function HexToInt (Hex : String) : Integer;

Transfer Hexidecimal to Color

function InvertColor(C: TColor) : TColor;


function IsGreyColor(C : TColor) : Boolean;

Misc A Whole BMP to One Color

------------------------------------------- | 0 |---|---|---|---| 255 | | Black White | -------------------------------------------


function IsLightColor(C : TColor) : Boolean;

Check if the Color is grey color

function MergeColor(C1, C2 : TColor) : TColor;

Correct the Wrong Color Byte

function MergeColorExt(C1, C2 : TColor; Grade: Byte) : TColor;

10 July 1997

function MiscBmpToColor(SDC : Integer; W, H : Integer; A : TRect) : TColor;

Misc A Number of Colors To One

This function is written after the MiscColor, because I thought the Variant Parameter Make the tranfering too slow.


function MiscColor(var C : Variant) : TColor;

Merge Two Color to One

function MiscVBToColor(VB : TVirtualBitmap; A : TRect) : TColor;


function QBColor (n:Integer) : TColor;

Common Used in Quick Basic

function RGBAvg(C : TColor) : Integer;

Check if the Color is Light Color {Added 19-March-1997

function SumRGB(C : TColor) : Integer;


function ToQBColor (C: TColor) : Integer;


Types


Constants


Variables