SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    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 prefers-color-scheme 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 (SheetElement) 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).

      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: ThemeMode

        Optional controlled scheme; when provided it wins over the preference.

      Returns ThemeMode