Skip to content

theme/accents

import { … } from 'zidane-ui'ui/src/theme/accents.ts

Functions#

presetForFunction#

The preset a stored accent is one of the variants of.

TypeScript
function presetFor(hex: string | null): AccentPreset | undefined
Parameters
NameTypeDescription
hexstring | null

The stored #rrggbb, or null for the theme's own accent.

AccentPreset | undefined

The preset, or undefined for the theme's accent or a custom colour.

ui/src/theme/accents.ts:40

Constants#

ACCENT_PRESETSConstant#

The accent presets, in display order.

TypeScript
const ACCENT_PRESETS: readonly AccentPreset[]

ui/src/theme/accents.ts:25

Interfaces#

AccentPresetInterface#

An accent the user can pick instead of the theme's own.

TypeScript
interface AccentPreset
AccentPreset properties
NameTypeDescription
darkstring

#rrggbb for dark themes.

huenumber

Hue, for ordering and tinting the swatches.

idstring

Stable id.

labelstring

Display name.

lightstring

#rrggbb for light themes.

ui/src/theme/accents.ts:11