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?
The hexadecimal color code #d3b176 is a medium light shade of brown. In the RGB color model #d3b176 is comprised of 82.75% red, 69.41% green and 46.27% blue. In the HSL color space #d3b176 has a hue of 38° (degrees), 51% saturation and 65% lightness.
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));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With