SheetXL - v1.0.2
    Preparing search index...

    Function useGridColorScheme

    • The grid body's resolved light/dark scheme — the single source of the grid's mode.

      Derived from the shared appearance preference: the user's light/dark override (ThemeStateKey.Mode, resolved via useResolvedThemeMode when unset), gated by Enable Dark Grid (ThemeStateKey.DarkGrid, off unless a host or the user turns it on) so the grid stays light in a dark app unless opted in.

      Because it reads the shared (module-singleton) preference store, every caller — the grid surface (WorksheetElement) and chrome that must match the grid but renders outside its DOM (the table-style preview, the cell-style / color pickers) — resolves the same value with no prop-threading and no drift from the studio (which reads the same keys the same way).

      Inside a workbook or worksheet element the element's own scheme wins: a host that passes gridColorScheme gets it for everything drawn in that grid (charts, cell renderers, sheet tabs), not only the cells.

      A consumer uses it to set data-sxl-theme-surface="grid" + data-sxl-theme-mode={scheme} on its own element, then resolves --sxl-* from the cascade / getComputedStyle.

      Parameters

      • Optionaloverride: "auto" | ThemeMode

        Optional controlled scheme; when provided it wins over the enclosing grid and the preference. 'auto' follows the page class, else the OS, without the Enable Dark Grid gate: the host asked for it.

      Returns ThemeMode