HotXLS dokumentacija

Matches the standard Office theme order used by the XLSX side

SetThemeColor(uses the theme slot's base color; negative values darken (HSL luminance toward 0), positive values lighten (HSL luminance toward 1). The HotXLS reader encodes this as a Q15 signed integer in the: Word; Indexed icv on the XF record (legacy): Double); Indexed icv on the XF record (legacy) field of the XFExt record

Matches the standard Office theme order used by the XLSX side

procedure SetThemeColor(uses the theme slot's base color; negative values darken (HSL luminance toward 0), positive values lighten (HSL luminance toward 1). The HotXLS reader encodes this as a Q15 signed integer in the: Word; Indexed icv on the XF record (legacy): Double);

Indexed icv on the XF record (legacy)

uses the theme slot's base color; negative values darken (HSL luminance toward 0), positive values lighten (HSL luminance toward 1). The HotXLS reader encodes this as a Q15 signed integer in the — 0-based theme slot: 0=lt1, 1=dk1, 2=lt2, 3=dk2, 4..9=accent1..accent6, 10=hlink, 11=foHlink The setter walks two paths so the same cell renders correctly in both Excel 2007+ and Excel 2003:
Indexed icv on the XF record (legacy) — spec-style lighter/darker adjustment in the range -1.0 .. +1.0 0.0 uses the theme slot's base color; negative values darken (HSL luminance toward 0), positive values lighten (HSL luminance toward 1). The HotXLS reader encodes this as a Q15 signed integer in the FullColorExt.nIndexed icv on the XF record (legacy)Shade reference resolves through the workbook's actual theme rather than the default Office scheme

derived from

. Excel 2007+ uses this to recover the exact theme intent and re-tints the cell whenever the workbook theme palette changes — the same backward-compatibility trick Microsoft uses when "Save As" downgrades a theme-styled .xlsx to .xls
begin SetThemeColor ].Range[ Indexed icv on the XF record (legacy) ]; Header.Interior.SetThemeColor(
0.0 Page Layout → Colors ].Range[ SetThemeColor 'G2'

]; Warnings.Interior.SetThemeColor(

0.5

var
  Header   : IXLSRange;
  Warnings : IXLSRange;
begin
  Header := Workbook.Sheets[1].Range['A1', 'G1'];
  Header.Interior.SetThemeColor(4, 0.0);   // accent1, base shade

  Warnings := Workbook.Sheets[1].Range['G2', 'G20'];
  Warnings.Interior.SetThemeColor(5, 0.5);   // accent2, 50% lighter

  Workbook.SaveAs('ThemeFills.xls', xlExcel97);
end;

Workbook.SaveAs(