HotXLS Belgeleri İçindekiler Ana sayfa Genel bakış IXLSFont XLS color model Ana sayfa İçindekiler Genel bakış

SetThemeColor method (Font)

Sets the font color to one of the 12 Office theme color slots with an optional tint adjustment. Theme companion of Font.Color — use it when the application wants to follow the workbook theme palette instead of pinning a literal RGB. Available since v2.61.0 (chart backlog wave D phase 4)

Sözdizimi

procedure SetThemeColor(ThemeIdx: Word; Tint: Double);

Parametreler

ThemeIdx — 0-based theme slot (0=lt1, 1=dk1, 2=lt2, 3=dk2, 4..9=accent1..6, 10=hlink, 11=foHlink) Tint — spec-style lighter/darker adjustment in the range -1.0 .. +1.0 Encoded into the XFExt FullColorExt as a Q15 signed integer in nTintShade

Açıklamalar

The setter behaves identically to Interior.SetThemeColor, but writes the rsFont slot of the XFExt $087D extType ($000D). The Font XF entry still receives a best-match indexed icv so Excel 97-2003 sees an approximation; Excel 2007+ recovers the exact theme idx + tint from the XFExt FullColorExt slot Reading back via Font.Color returns the RGB resolved through the workbook's BIFF theme palette, so the application always sees a concrete LongWord regardless of whether the original setter was RGB or theme based

Örnek

Tags an audit column with accent3 + tint so the font color tracks the workbook theme
Workbook.Sheets[1].Range['D2', 'D50'].Font.SetThemeColor(6, - 0.25); Workbook.SaveAs('AuditColumn.xls', xlExcel97);

Ayrıca bkz.

arayüzü IXLSFont
IXLSFont.Colorözellik
IXLSInterior.SetThemeColoryöntem
IXLSBorder.SetThemeColoryöntem
Classic XLS color model Copyright © 2010-2026 losLab Software