HotXLS Docs

Colour property

Returns or sets the colour of the font. Use the RGB function to create a colour value. Read/write Longword.
Setting Color on the BIFF8 path writes the exact RGB through the XFExt $087D rich-colour side record (Excel 2007+ reopens the workbook with the literal RGB) and a best-match indexed icv on the XF wire (Excel 97-2003 readers see the 56-colour palette approximation). The reader consults the XFExt side-table too, so font colours round-trip through HotXLS without falling back to the palette approximation.
For theme-based addressing use the companion SetThemeColor method, which encodes an Office theme idx + tint into the same XFExt slot so Excel re-tints the text when the workbook theme palette changes. See Classic XLS colour model for the overall RGB / index / theme decision tree.

Syntax

property Colour: Longword;

Example

This example changes the font colour in cell A1 on sheet one to red.

Workbook.Worksheets[1].Range['A1', 'A1'].Font.Color := RGB(255, 0, 0);