# Colors

Cube UI Kit color tokens are generated by Glaze from a shared OKHST palette. Every adaptive token includes light, dark, and high-contrast variants. Change the active scheme in the Storybook toolbar to review each example.

The colors shown here come from the default seeds. Those seeds — brand hue, saturation, per-status hues — are tunable at runtime; see [Theming](./Theming.md) for a live playground.

## Choosing a color pair

Start with the surface, then choose a foreground designed for that surface:

- On neutral surfaces, use the matching text family: `#surface` + `#surface-text`, `#surface-2` + `#surface-2-text`, and so on.
- On semantic tinted surfaces, use `#<theme>-surface-text` for a neutralized, high-contrast foreground.
- Use `#<theme>-accent-text` or `-soft` when the foreground should retain the semantic hue, such as notification titles and links.
- On solid accent fills, use `#<theme>-accent-surface-text`.
- Do not select colors only because they look similar. Their names describe the contrast relationship and intended role.

The text examples show each color with `t3m`, `t3`, and `t4`. Typography does not change the color pairing; it makes the foreground easier to evaluate at common UI sizes and weights.

## Neutral surfaces

Neutral surfaces form the page, panel, and nested-container elevation ladder. Use the text tokens named for the selected surface whenever one exists.

## Semantic surfaces

Semantic surfaces support two deliberate foreground treatments.

### Surface text

The surface-text family keeps the semantic hue subtle and prioritizes strong readability.

### Accent text

The accent-text family preserves more semantic color. This is the pairing used by notification and Item card styles.

## Solid accents and interaction states

Solid accent fills are fixed brand colors with a dedicated light foreground. The numbered surface ramp represents default, hover, and pressed states and is shared by semantic themes.

## Disabled states

Disabled pairs intentionally have lower contrast than active content. Use the neutral pair for low-emphasis controls and the accent-disabled pair for muted solid semantic controls. Do not use disabled text for active information or content that must meet normal text contrast requirements.

## Utility colors

`#placeholder`, `#focus`, semantic accent icons, and `#overlay` have narrow roles. Keep them in those roles rather than treating them as general palette swatches.

## Code syntax

Syntax tokens are calibrated as a group against `#surface`. Use the semantic token for each syntax role instead of assigning arbitrary palette colors.

## Borders and shadows

Borders use the `1bw` design-system width. Shadow geometry comes from `src/tokens/shadows.ts`; the `#shadow-sm`, `#shadow-md`, and `#shadow-lg` colors adapt with the active scheme.

## Scope

This reference focuses on tokens intended for product UI. Internal loading-face colors and compatibility aliases are intentionally omitted.
