# theme/accents (zidane-ui)

Import: `import { … } from 'zidane-ui'`. Source: [ui/src/theme/accents.ts](https://github.com/Tahul/zidane/blob/main/ui/src/theme/accents.ts).

## Functions

### `presetFor`

Function.

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

```ts
function presetFor(hex: string | null): AccentPreset | undefined
```

**Parameters**

- `hex` (`string | null`): The stored `#rrggbb`, or `null` for the theme's own accent.

**Returns** `AccentPreset | undefined`: The preset, or `undefined` for the theme's accent or a custom colour.

Source: [ui/src/theme/accents.ts:40](https://github.com/Tahul/zidane/blob/main/ui/src/theme/accents.ts#L40)

## Constants

### `ACCENT_PRESETS`

Constant.

The accent presets, in display order.

```ts
const ACCENT_PRESETS: readonly AccentPreset[]
```

Source: [ui/src/theme/accents.ts:25](https://github.com/Tahul/zidane/blob/main/ui/src/theme/accents.ts#L25)

## Interfaces

### `AccentPreset`

Interface.

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

```ts
interface AccentPreset
```

**Properties**

- `dark` (`string`): `#rrggbb` for dark themes.
- `hue` (`number`): Hue, for ordering and tinting the swatches.
- `id` (`string`): Stable id.
- `label` (`string`): Display name.
- `light` (`string`): `#rrggbb` for light themes.

Source: [ui/src/theme/accents.ts:11](https://github.com/Tahul/zidane/blob/main/ui/src/theme/accents.ts#L11)
