views:

95

answers:

3

If i want to set a colour property to something thats non-standard (i.e. not something like clBlack or clRed) how can i do this? Can i set something like hexadecimal colours?

+1  A: 

I always used RGB macro: http://delphi.wikia.com/wiki/RGB

Andrey
+2  A: 

you can use $00BBGGRR

BB = Blue
GG = Green
RR = Red

All these values can between 0 and 255 ($00 and $FF)

SimaWB
+5  A: 

RGB in Windows.pas

function RGB(r, g, b: Byte): COLORREF;

you can cast the result to be a TColor.

e.g

MyColour := TColor(RGB(Red,Green,Blue));
JamesB