Foundations
Colour
Kanso's colour is ink and paper with a single product colour, plus four status colours that never stand alone. Every token is a role with a value per theme; components read roles, never raw values. The Colors view shows each token in both themes with its usage note and its ratios.
Try a pair
Check a pair
Light: 16.6:1
Meets AA for text
Dark: 15.8:1
Meets AA for text
Roles
| Role | Tokens | Where |
|---|---|---|
| Ground | kui-color-paper | The page. Lists and rows sit flat on it. |
| Layers | kui-color-kanso-surface, kui-color-surface-sunken, kui-color-container | Cards and sheets; recessed fills; tonal fills. |
| Lines | kui-color-divider, kui-color-outline | Hairlines between rows; boundaries of controls. |
| Text | kui-color-ink, kui-color-ink-muted, kui-color-on-ink | Body and titles; secondary text; text on ink fills. |
| Product | kui-color-accent, kui-color-on-accent, kui-color-accent-soft, kui-color-on-accent-soft, kui-color-accent-on-ink | The one highlighted action, the now marker, meters, selection bars, links, focus. |
| Spotlight | kui-color-spotlight, kui-color-on-spotlight, kui-color-on-spotlight-muted, kui-color-spotlight-button, kui-color-on-spotlight-button, kui-color-spotlight-tonal, kui-color-spotlight-line | The card for what needs the person now. |
| Status | kui-color-positive, kui-color-caution, kui-color-negative, kui-color-critical, each with -soft and on-…-soft | Done and money in; late; losses and debts; errors. |
| Utility | kui-color-focus-ring, kui-color-scrim | Keyboard focus; behind dialogs and sheets. |
The Material Design role names
The components read Material Design's role names, and each is a reference to a Kanso colour, so redeclaring a Kanso colour moves every role that follows it:
| Material Design role | Kanso colour |
|---|---|
kui-color-surface, kui-color-background, kui-color-surface-dim | paper |
kui-color-surface-container-lowest to -high, kui-color-surface-bright | Kanso's surface (kui-color-kanso-surface) |
kui-color-surface-container-highest, kui-color-surface-variant | surface-sunken |
kui-color-on-surface, kui-color-on-background, kui-color-secondary, kui-color-inverse-surface | ink |
kui-color-on-surface-variant | ink-muted |
kui-color-primary, kui-color-surface-tint, kui-color-focus-ring | accent |
kui-color-on-primary | on-accent |
kui-color-primary-container, kui-color-tertiary, kui-color-tertiary-container | accent-soft |
kui-color-secondary-container | container |
kui-color-outline-variant | divider |
kui-color-error, kui-color-error-container | critical, critical-soft |
kui-color-positive-container, kui-color-negative-container | positive-soft, negative-soft |
How the values were built
Kanso chooses colour by contrast: a text colour is picked for the ratio it must reach on its ground, and its tone in the dark theme is picked again for the same ratio, rather than flipped. The targets:
- Body text: 4.5:1 or more on every ground its note names (most reach 6:1 or more).
- Large text, 24px and up: 3:1, though Kanso keeps its titles in ink anyway.
- Control boundaries, the focus ring, meter fills and status marks: 3:1.
- Fills that carry text (accent, critical, the soft fills): the pair with their
on-token reaches 4.5:1.
The neutrals are the brand's own: paper #fafafa, ink #1a1a1a, container #e9e9e9, muted #5c5c5c, outline #8a8a8a, and their dark counterparts. They carry no hue: the product colour is the only hue on a calm screen.
Rules
- Do spend the accent on at most one action per screen. Strong secondary actions are ink, quiet ones tonal or outlined.
- Do use ink for selection (a checked box, a selected chip, the active navigation pill) and the accent for "now" and progress.
- Do pair every fill with its
on-token. Never put white or black on a fill by hand. - Don't use a status colour for decoration, and don't use critical for money: a debt is negative or plain ink, never an error.
Text'snegativetone and itserrortone are separate for that reason. - Don't tell two things apart by hue alone. Lightness, shape, a word or a sign must also differ.
- Don't invert colours for dark mode. Use the dark values: they are tuned for the same ratios.
Amounts
Money coming to the person is positive with a +; money going out is negative with a − where it is a loss, and plain ink with a − where it is an ordinary movement, such as a planned payment. The sign is the meaning; the colour repeats it. Currency writes the sign with its sign prop and reads the tone off the value with tone="auto".
Product colours
Each product replaces the product roles with its own, built to the same targets. The sample product colour is violet, #6b3fa0 in light and #cdb0f5 in dark. See Product colours.