OptionalschemeLookup: SchemeLookup | nullOptionalindexedLookup: IndexedLookup | nullOptionalsystemLookup: SystemLookup | nullFor runtime type checking.
Returns a new color that is derived from this color with the adjustments applied.
An array of Adjustments
Return the color adjustments.
Returns the base color without any adjustments applied.
For a system color, returns the authored fallback value (OOXML lastClr) as a 6-digit hex
string (no leading #), or null if none. This is the value used when no
IColor.SystemLookup resolves the color (e.g. headless rendering).
The base value for the color before adjustments.
Returns true if the other color will resolve to the same rgb values as this color.
The other color to compare.
Returns the color as either 'black or white' depending on the luminance.
The threshold to determine if the color is dark or light.
Return a string usable with CSS color properties.
false/true bake a concrete light/dark value — use when the output leaves
live CSS (clipboard HTML, export, canvas). 'adaptive' emits a light-dark() expression the
browser re-resolves from the subtree's color-scheme — a light/dark flip needs no re-render
(renderers should prefer this; see IColor.CSSMode).
If true alpha will be applied.
Return a HEX with adjustments applied.
Return as HSLA with adjustments applied.
Return as RGBA with adjustments applied.
StaticgetReturns the default color scheme lookup that Colors will use if none is provided.
StaticgetReturns the global default IColor.SystemLookup, or null if system colors
resolve to their built-in baked values.
StaticgetReturns the built-in (baked) values for the system colors as a map of
${name} (lower-case) -> #RRGGBB.
These are the hardcoded system color definitions. A host renderer (@sheetxl/react) uses
them to seed the default --sxl-sys-color-* CSS variables (which Color.toCSS references);
a host then overrides those variables to theme the grid.
StaticgetThe current system-color epoch. Consumers that cache resolved system colors (such as a
document Theme) can compare against this to know when to re-resolve.
StaticinvalidateInvalidates cached system-color resolutions (call when the host theme changes but the lookup function itself stays the same, e.g. CSS variables were updated).
StaticisReturns true if the named color is a system color (e.g. windowText, window, btnFace).
System colors are environment-dependent and are candidates for host theming
(see IColor.SystemLookup). Non-system named colors (e.g. red) and
transparent return false.
StaticsetSets the global default IColor.SystemLookup used to resolve system colors
(e.g. windowText, window) when no per-color lookup is supplied.
The lookup to install, or null to clear.
The previous lookup.
Capabilities for working with colors.
Advanced color customization and compatibility with CSS and Office color schemes.
Key features include:
See
IColor