Skip to content

@jsvision/core / ThemeOptions

Interface: ThemeOptions

Defined in: color/create-theme.ts:26

Seed colors and override hooks for createTheme.

Properties

accelerator?

readonly optional accelerator?: Color

Defined in: color/create-theme.ts:34

In-dialog control hotkey (accelerator) seed; defaults to an amber. Independent of warning.


accent

readonly accent: Color

Defined in: color/create-theme.ts:30

The brand/accent seed — a resolvable color (hex or named), not 'default'.


danger?

readonly optional danger?: Color

Defined in: color/create-theme.ts:38

Danger signal seed; defaults to a red. Drives the dangerText role a Text paints at severity: 'error'.


info?

readonly optional info?: Color

Defined in: color/create-theme.ts:44

Info signal seed; defaults to a blue.


readonly optional menuAccelerator?: Color

Defined in: color/create-theme.ts:36

Menu-bar / status-line hotkey (accelerator) seed; defaults to a red. Independent of danger.


mode

readonly mode: "light" | "dark"

Defined in: color/create-theme.ts:28

Light or dark: inverts which end of the neutral ramp becomes surface vs. text.


neutral?

readonly optional neutral?: Color

Defined in: color/create-theme.ts:32

Neutral seed for the surface/text ramp; defaults to a mode-neutral gray. Low-chroma works best.


overrides?

readonly optional overrides?: Partial<ThemeColors>

Defined in: color/create-theme.ts:46

Per-alias overrides merged after generation — an overridden alias re-drives every role that uses it.


roleOverrides?

readonly optional roleOverrides?: RoleOverrides

Defined in: color/create-theme.ts:54

Per-role overrides deep-merged last — surgical single-role/single-field fixes.

Each role is optional, and so is each field within it: patching one field leaves the rest of that role as generated. Partial<Theme> cannot express that — it would make every field of a named role mandatory, forcing a caller to restate the values it does not want to change.


success?

readonly optional success?: Color

Defined in: color/create-theme.ts:42

Success signal seed; defaults to a green.


warning?

readonly optional warning?: Color

Defined in: color/create-theme.ts:40

Warning signal seed; defaults to an amber. Drives the warningText role a Text paints at severity: 'warning'.