HotXLS-dokumentation

Color egenskap

Returnerar or sets the color of the font. Use the RGB function to create a color value. Read/write Longword
Setting Color på BIFF8-vägen skriver exakt RGB via XFExt-sidoposten $087D för rik färg (Excel 2007+ öppnar arbetsboken igen med den bokstavliga RGB-färgen) och ett bäst matchande indexerat icv på XF-tråden (läsare i Excel 97-2003 ser 56-färgspalettsapproximationen). Läsaren använder också XFExt-sidotabellen, så typsnittsfärger round-trippar genom HotXLS utan att falla tillbaka till palettapproximationen
For theme-based addressing use the companion SetThemeColor -metod, som kodar Office-tema idx + tint i samma XFExt-plats så att Excel tonar om texten när arbetsbokens temapalett ändras. Se Classic XLS color model for the overall RGB / index / theme decision tree

Syntax

property Color: Longword;

Exempel

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

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