Pipeline

  1. 1. Source

    core, semantic.light and semantic.dark token files, plus one brand file per pack.

  2. 2. Resolve

    Aliases like {color.blue.700} are followed, typed and checked for cycles.

  3. 3. Emit

    CSS variables per mode and brand, and token('color.accent') types for TypeScript.

  4. 4. Check

    27 contrast pairs per theme. profile:check fails the build below AA.

.bk-button--primary {
  background: var(--bk-color-accent);
  color: var(--bk-color-on-accent);
}

import { token } from '@brandkit/tokens';
const style = { borderColor: token('color.border-strong') };

Contrast on the active theme

Switch the brand or mode in the top bar. The values below are read from the page, so they show exactly what you see.

27 of 27 pass WCAG 2.2 AA on the active theme: brand profile, mode light.

Contrast checks on the active theme
Body text on pagetext on bg16.47:14.5:1Pass
Body text on cards and inputstext on surface17.73:14.5:1Pass
Text in dialogs and toaststext on surface-raised17.73:14.5:1Pass
Table header texttext on surface-sunken15.41:14.5:1Pass
Hovered table body text (55% sunken over surface)text on surface-sunken16.44:14.5:1Pass
Hovered table metadata (55% sunken over surface)text-muted on surface-sunken7.00:14.5:1Pass
Secondary text on pagetext-muted on bg7.01:14.5:1Pass
Hints and descriptionstext-muted on surface7.55:14.5:1Pass
Hints in dialogstext-muted on surface-raised7.55:14.5:1Pass
Links on pageaccent-text on bg7.02:14.5:1Pass
Links and active tabs on cardsaccent-text on surface7.56:14.5:1Pass
Accent badgeaccent-text on accent-subtle6.53:14.5:1Pass
Primary button labelon-accent on accent7.56:14.5:1Pass
Primary button label on hoveron-accent on accent-hover10.53:14.5:1Pass
Danger button labelon-danger on danger6.47:14.5:1Pass
Danger button label on hover (92% brightness)on-danger on danger6.13:14.5:1Pass
Field errors inherited from page backgrounddanger-text on bg6.00:14.5:1Pass
Field error messagedanger-text on surface6.47:14.5:1Pass
Field errors in dialogs and popoversdanger-text on surface-raised6.47:14.5:1Pass
Danger badgedanger-text on danger-subtle5.91:14.5:1Pass
Success badgesuccess-text on success-subtle5.20:14.5:1Pass
Warning badgewarning-text on warning-subtle6.83:14.5:1Pass
Input and checkbox outlineborder-strong on surface4.62:13:1Pass
Checked control fill, switch trackaccent on surface7.56:13:1Pass
Focus ring on pagefocus on bg4.62:13:1Pass
Focus ring on cardsfocus on surface4.97:13:1Pass
Inverted tooltip textbg on text16.47:14.5:1Pass

Color roles

  • color.bg#f4f7f8
  • color.surface#ffffff
  • color.surface-raised#ffffff
  • color.surface-sunken#eaf0f2
  • color.text#111827
  • color.text-muted#4b5563
  • color.border#d8e1e4
  • color.border-strong#647880
  • color.accent#0f5c6e
  • color.accent-hover#0b4554
  • color.on-accent#ffffff
  • color.accent-text#0f5c6e
  • color.accent-subtle#e3f1f4
  • color.focus#137a91
  • color.danger#b91c1c
  • color.on-danger#ffffff
  • color.danger-text#b91c1c
  • color.danger-subtle#fef2f2
  • color.success-text#047857
  • color.success-subtle#ecfdf5
  • color.warning-text#92400e
  • color.warning-subtle#fffbeb

Scales

Spacing

  • --bk-space-00px
  • --bk-space-10.25rem
  • --bk-space-20.5rem
  • --bk-space-30.75rem
  • --bk-space-41rem
  • --bk-space-51.25rem
  • --bk-space-61.5rem
  • --bk-space-82rem
  • --bk-space-102.5rem
  • --bk-space-123rem
  • --bk-space-164rem
  • --bk-space-246rem

Radius

Radius comes from the brand layer, so these change when you switch brands.

  • --bk-radius-sm3px
  • --bk-radius-md6px
  • --bk-radius-lg8px
  • --bk-radius-pill999px

Type

  • Aa--bk-font-size-5xl3rem
  • Aa--bk-font-size-4xl2.25rem
  • Aa--bk-font-size-3xl1.875rem
  • Aa--bk-font-size-2xl1.5rem
  • Aa--bk-font-size-xl1.25rem
  • Aa--bk-font-size-lg1.125rem
  • Aa--bk-font-size-md1rem
  • Aa--bk-font-size-sm0.875rem
  • Aa--bk-font-size-xs0.75rem

Motion and density

  • --bk-duration-fast 120ms
  • --bk-duration-normal 200ms
  • --bk-duration-slow 320ms
  • --bk-easing-standard cubic-bezier(0.2, 0, 0, 1)
  • --bk-easing-emphasized cubic-bezier(0.3, 0, 0, 1)
  • --bk-density-scale 0.875 profile