Board index » delphi » RGB to TColor

RGB to TColor

I Would like set a RGB color export from a TChartFX to a component
wich use TColor

How must i proceed?

Best regards

Georges

 

Re:RGB to TColor


Quote
On Wed, 29 Oct 1997 09:55:15 GMT, e...@nordnet.fr (Georges) wrote:
>I Would like set a RGB color export from a TChartFX to a component
>wich use TColor

>How must i proceed?

At least in D2/D3, Graphics.pas defines TColor as:

        TColor = $80000000..$7FFFFFFF;

Thus, you can do a simple typecast:

        MyRGB := Integer(clRed);
        MyColor := TColor(RGB(255,0,0));

HTH.

Regards,

Jani J?rvinen
Helsinki Finland

Tools, information, tips, reviews & bug lists
for professional Delphi, Win32 and WinHelp developers.

mailto:ja...@dystopia.fi
http://www.dystopia.fi/~janij/

Other Threads