Tokens
Every token in light and dark, and in a sample product colour, with its usage note, read from the tokens kanso-ui ships.
333 tokens, read from kanso-ui 0.59.0’s tokens.css, whose tokens are kanso-ui-core 0.8.0’s, with the usage notes of that release. Each family also has a page of its own: colour, typography, space and size, shape and elevation. The sample column is each colour a product moves, in the sample product colour, violet, which belongs to no product: each product supplies its own through defineProductTheme.
Family
Every family
Tokens
Kanso’s own
157 of 333 tokens
| Token | Light | Dark | Sample: violet | Usage |
|---|---|---|---|---|
--kui-color-accent-on-ink | #fafafa | #121212 | #c9a8f0#6b3fa0 | The product colour where the ground is ink: the action of a snackbar, its focus ring, a link on an ink band. The base is on-ink: 16.7:1 on ink in light, 15.9:1 in dark. |
--kui-color-accent-soft | #e9e9e9 | #2b2b2b | #efe6f8#3b2557 | Quiet accent fills: a selected list row, the accent badge, a persona avatar that needs the product colour. The base is container. |
--kui-color-accent | #1a1a1a | #ececec | #6b3fa0#cdb0f5 | The product colour: the one highlighted action per screen, the timeline's now mark, meter fills, the navigation pane's selection bar, links and the focus ring. The base is ink, since the brand has no colour of its own (16.7 and 17.4:1 on paper and surface in light; 15.9 and 14.4:1 in dark); a product sets its own through defineProductTheme, with every role that reads the accent following it. |
--kui-color-caution-soft | #ffe7cc | #4a2a00 | the base | Fill of the late badge and the caution inline alert. The caution icon on it holds 4.0:1 in light and 7.6:1 in dark. |
--kui-color-caution-stripe | #ffc27a | #7a4600 | the base | The second colour of the late hatch inside a meter, between caution stripes. A pattern only, never text. |
--kui-color-caution | #b25b00 | #ffb870 | the base | Late and needs attention: the late mark, the attention icon, short text such as '1 late'. On paper and surface: 4.6 and 4.8:1 in light; 11.0 and 10.0:1 in dark. Always with a word or an icon too. Status text sits on paper or surface only; on surface-sunken or container a component uses the -soft pair or ink. |
--kui-color-container | #e9e9e9 | #2b2b2b | the base | Tonal fills: the tonal button, a meter's empty track, a persona or team avatar without a person's own colour, the neutral badge. |
--kui-color-critical-soft | #fcdedc | #4d1512 | the base | Fill of the critical inline alert. |
--kui-color-critical | #b3261e | #f2b8b5 | the base | Validation errors and destructive actions only, kept apart from negative so a negative balance never reads as a broken field. On paper and surface: 6.3 and 6.5:1 in light; 11.0 and 10.0:1 in dark. Status text sits on paper or surface only; on surface-sunken or container a component uses the -soft pair or ink. |
--kui-color-divider | #e3e3e3 | #333333 | the base | Hairlines between list rows and table rows, and decorative borders. Never the only boundary of a control: controls take outline. |
--kui-color-focus-ring | #1a1a1a | #ececec | #6b3fa0#cdb0f5 | Keyboard focus: a 2px solid ring drawn 2px outside the control, in the accent. On the base, ink: 16.7:1 on paper in light and 15.9:1 in dark. On spotlight the ring is on-spotlight. |
--kui-color-ink-muted | #5c5c5c | #b3b3b3 | the base | Secondary text: supporting lines, captions, labels above fields, inactive navigation items and icons. On paper, surface, surface-sunken and container: 6.4, 6.7, 5.9 and 5.5:1 in light; 8.9, 8.1, 7.2 and 6.7:1 in dark. |
--kui-color-ink | #1a1a1a | #ececec | the base | Text and icons on paper, surface, surface-sunken and container: 16.7, 17.4, 15.3 and 14.3:1 in light; 15.9, 14.4, 12.8 and 12.0:1 in dark. Also the fill of the strong (ink) button, the FAB, a checked control, a selected filter chip and the active navigation pill. |
--kui-color-inverse-error | #f2b8b5 | #b3261e | the base | A failure's mark on `kui-color-inverse-surface`, such as the warning glyph that leads a failed action's snackbar: the other scheme's `kui-color-critical`, which is what clears contrast there. |
--kui-color-kanso-surface | #ffffff | #1c1c1c | the base | Cards, sheets, dialogs, menus, the navigation bar and the selected item of the navigation pane: anything lifted one step off paper. Pair it with shadow-1 or a higher shadow. |
--kui-color-negative-soft | #fce3dc | #4a1a10 | the base | Fill of the negative badge. |
--kui-color-negative | #a63a1f | #ffb4a1 | the base | Negative balances and losses, never errors. On paper and surface: 6.2 and 6.5:1 in light; 11.0 and 10.0:1 in dark. Amounts also carry a − sign; a balance that is neither a gain nor a loss stays ink. Status text sits on paper or surface only; on surface-sunken or container a component uses the -soft pair or ink. |
--kui-color-on-accent-soft | #1a1a1a | #ececec | #3f1d63#eadcfc | Text and icons on accent-soft. The base is ink: 14.3:1 in light, 12.0:1 in dark. |
--kui-color-on-accent | #fafafa | #121212 | #ffffff#2a0d4a | Text and icons on accent fills. The base is on-ink: 16.7:1 in light, 15.9:1 in dark. |
--kui-color-on-caution-soft | #5c2e00 | #ffddb3 | the base | Text on caution-soft: 9.5:1 in light, 10.0:1 in dark. |
--kui-color-on-critical-soft | #5f0e0a | #ffdad6 | the base | Text on critical-soft: 10.7:1 in light, 11.0:1 in dark. |
--kui-color-on-critical | #ffffff | #601410 | the base | Text on critical fills, such as a destructive button: 6.5:1 in light, 7.7:1 in dark. |
--kui-color-on-ink | #fafafa | #121212 | the base | Text and icons on ink fills: 16.7:1 in light and 15.9:1 in dark. |
--kui-color-on-negative-soft | #5a1a0a | #ffdad0 | the base | Text on negative-soft: 10.8:1 in light, 11.2:1 in dark. |
--kui-color-on-positive-soft | #0b3a1b | #c6f2d2 | the base | Text on positive-soft: 10.9:1 in light, 10.3:1 in dark. |
--kui-color-on-spotlight-button | #1a1a1a | the same | #3f1d63 | Label of the main action inside the spotlight card, on its paper pill: ink in both schemes, 16.7:1 in light and 17.4:1 in dark. |
--kui-color-on-spotlight-muted | rgba(255, 255, 255, 0.8) | the same | rgba(255, 255, 255, 0.8) | Supporting text on spotlight (the eyebrow, the details and time): 11.4:1 in light and 9.6:1 in dark on the base spotlight. |
--kui-color-on-spotlight | #ffffff | the same | #ffffff | Titles, icons and the focus ring on spotlight: 17.4:1 in light, 14.0:1 in dark on the base spotlight. |
--kui-color-outline | #8a8a8a | #8c8c8c | the base | Boundaries of controls: text fields, the outlined button, checkboxes, radios, the switch track when off, a chip when not selected, the selected segment. 3.3:1 on paper and 3.5:1 on surface in light; 5.6:1 on paper and 5.1:1 on surface in dark. |
--kui-color-paper | #fafafa | #121212 | the base | The page itself: the ground every screen is painted on. Brand paper in light, night in dark. Lists and timeline rows sit flat on it. |
--kui-color-positive-soft | #ddf2e2 | #123a20 | the base | Fill of the positive badge and the positive inline alert. |
--kui-color-positive | #1e6b35 | #7bd99a | the base | Done, and positive balances. Text and icons on paper and surface: 6.3 and 6.5:1 in light; 10.9 and 9.9:1 in dark. Amounts also carry a + sign. Status text sits on paper or surface only; on surface-sunken or container a component uses the -soft pair or ink. |
--kui-color-scrim | rgba(0, 0, 0, 0.4) | rgba(0, 0, 0, 0.6) | the base | Behind a dialog or a modal sheet. The value carries its own opacity. |
--kui-color-shadow | #000000 | the same | the base | The ink of elevation shadows: black, as every Kanso shadow is drawn. |
--kui-color-spotlight-button | #fafafa | #ffffff | #fafafa#ffffff | The main action inside the spotlight card: a paper pill. |
--kui-color-spotlight-line | rgba(255, 255, 255, 0.6) | the same | rgba(255, 255, 255, 0.6) | The border of an outlined button inside the spotlight card: 3.8:1 on spotlight. |
--kui-color-spotlight-tonal | rgba(255, 255, 255, 0.16) | rgba(255, 255, 255, 0.14) | #7951a9#705299 | Secondary buttons inside the spotlight card; their label is on-spotlight, and their hover and pressed layers are on-spotlight at 8% and 12%. On the base spotlight the label is 10.6:1 at rest and 7.4:1 pressed in light, 9.0:1 and 6.4:1 in dark. A theme that sets a spotlight without its own tonal fill gets on-spotlight mixed into the spotlight, up to 16%, as far as keeps the pressed label at 4.5:1. |
--kui-color-spotlight | #1a1a1a | #2b2b2b | #6b3fa0#553186 | The spotlight card: the one thing that needs the person now. One per screen, never a decoration. The base is a deep neutral in both schemes, ink in light and container in dark, so its content stays white. |
--kui-color-surface-sunken | #f0f0f0 | #262626 | the base | Recessed fills on paper or surface: the search field, the segmented control's track, hover and pressed rows. Never a card. |
--kui-radius-kanso-2xl | 24px | the same | the base | Cards on phones. |
--kui-radius-kanso-3xl | 28px | the same | the base | The spotlight card, dialogs and the top corners of a sheet. |
--kui-radius-kanso-lg | 16px | the same | the base | The FAB and the cards of a dense web grid. |
--kui-radius-kanso-md | 12px | the same | the base | Text fields, menus, snackbars, inline alerts and navigation pane items. |
--kui-radius-kanso-pill | 999px | the same | the base | Every button, chip, badge, segmented control and the search field. |
--kui-radius-kanso-sm | 8px | the same | the base | Tooltips, team avatars, small thumbnails. |
--kui-radius-kanso-xl | 20px | the same | the base | Cards on the web. |
--kui-radius-kanso-xs | 4px | the same | the base | Small marks and the meter's segments. |
--kui-shadow-kanso-1 | 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 2px 8px 0px rgba(0, 0, 0, 0.04) | 0px 1px 2px 0px rgba(0, 0, 0, 0.5) | the base | Cards, the selected navigation pane item, the selected segment. |
--kui-shadow-kanso-2 | 0px 2px 6px 0px rgba(0, 0, 0, 0.08), 0px 8px 20px 0px rgba(0, 0, 0, 0.1) | 0px 4px 16px 0px rgba(0, 0, 0, 0.6) | the base | Things that float over content: the FAB, menus, snackbars, tooltips. |
--kui-shadow-kanso-3 | 0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14) | 0px 12px 40px 0px rgba(0, 0, 0, 0.7) | the base | Dialogs and sheets, above the scrim. |
--kui-sizing-kanso-avatar-lg | 56px | the same | the base | The spotlight card's lead. |
--kui-sizing-kanso-avatar-md | 36px | the same | the base | Avatars that lead a list row; the signed-in person in an app bar. |
--kui-sizing-kanso-avatar-sm | 28px | the same | the base | Avatar stacks beside a title. |
--kui-sizing-kanso-control-lg | 48px | the same | the base | Default controls on phones: buttons, fields, icon buttons, the minimum touch target. |
--kui-sizing-kanso-control-md | 40px | the same | the base | Default controls on the web: buttons and fields. |
--kui-sizing-kanso-control-sm | 32px | the same | the base | Compact controls on the web: small buttons, segments inside a dense toolbar. |
--kui-sizing-kanso-control-xl | 56px | the same | the base | The FAB and the spotlight card's main action. |
--kui-sizing-kanso-icon-lg | 24px | the same | the base | Standalone icons: navigation, icon buttons, list leads. |
--kui-sizing-kanso-icon-md | 20px | the same | the base | Icons inside buttons, fields and alerts. |
--kui-sizing-kanso-icon-sm | 16px | the same | the base | Icons inside badges and dense text. |
--kui-sizing-kanso-icon-xl | 40px | the same | the base | Empty states and large leads. |
--kui-sizing-kanso-row-compact | 44px | the same | the base | Table rows and one-line rows on the web. |
--kui-sizing-kanso-row | 60px | the same | the base | Two-line list rows on phones. |
--kui-spacing-kanso-2xl | 24px | the same | the base | Gaps between blocks on the web; the dialog's padding. |
--kui-spacing-kanso-2xs | 2px | the same | the base | Between two lines of one row (title and supporting line). |
--kui-spacing-kanso-3xl | 32px | the same | the base | Page gutters on the web. |
--kui-spacing-kanso-4xl | 40px | the same | the base | Page gutters on wide windows; space before a page's footer. |
--kui-spacing-kanso-5xl | 56px | the same | the base | Documentation pages and covers. |
--kui-spacing-kanso-lg | 16px | the same | the base | The default inset: card padding, the phone's side margin, the gap inside a card. |
--kui-spacing-kanso-md | 12px | the same | the base | Between a row's lead and its text; the gap between cards in a phone column. |
--kui-spacing-kanso-sm | 8px | the same | the base | Between buttons of a group, an icon and its label, chips in a row. |
--kui-spacing-kanso-xl | 20px | the same | the base | The spotlight card's padding; space above a section title. |
--kui-spacing-kanso-xs | 4px | the same | the base | Inside tight groups: a segmented control's inset, icon and label in a navigation item. |
--kui-state-layer-opacity-kanso-disabled-container | 0.12 | the same | the base | A disabled control's fill: ink at this strength. |
--kui-state-layer-opacity-kanso-disabled-content | 0.38 | the same | the base | A disabled control's label and icon: ink at this strength. Disabled controls are exempt from contrast rules, but say why they are disabled nearby. |
--kui-state-layer-opacity-kanso-focus | 0.1 | the same | the base | Keyboard focus, together with the focus ring. |
--kui-state-layer-opacity-kanso-hover | 0.08 | the same | the base | Pointer over a control. |
--kui-state-layer-opacity-kanso-pressed | 0.12 | the same | the base | Pressed or dragged. |
--kui-typography-font-family-brand | 'Roboto Serif', 'Iowan Old Style', Georgia, serif | the same | the base | |
--kui-typography-font-family-mono | 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace | the same | the base | |
--kui-typography-font-family-plain | 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif | the same | the base | |
--kui-typography-font-family-voice | 'Roboto Serif', 'Iowan Old Style', Georgia, serif | the same | the base | |
--kui-typography-t-body-font | var( --kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ) | the same | the base | |
--kui-typography-t-body-large-font | var( --kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ) | the same | the base | |
--kui-typography-t-body-large-line-height | 26px | the same | the base | |
--kui-typography-t-body-large-size | 17px | the same | the base | |
--kui-typography-t-body-large-tracking | 0px | the same | the base | |
--kui-typography-t-body-large-weight | var( --kui-typography-weight-regular, 400 ) | the same | the base | |
--kui-typography-t-body-line-height | 20px | the same | the base | |
--kui-typography-t-body-size | 15px | the same | the base | |
--kui-typography-t-body-small-font | var( --kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ) | the same | the base | |
--kui-typography-t-body-small-line-height | 20px | the same | the base | |
--kui-typography-t-body-small-size | 14px | the same | the base | |
--kui-typography-t-body-small-tracking | 0px | the same | the base | |
--kui-typography-t-body-small-weight | var( --kui-typography-weight-regular, 400 ) | the same | the base | |
--kui-typography-t-body-strong-font | var( --kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ) | the same | the base | |
--kui-typography-t-body-strong-line-height | 22px | the same | the base | |
--kui-typography-t-body-strong-size | 16px | the same | the base | |
--kui-typography-t-body-strong-tracking | 0px | the same | the base | |
--kui-typography-t-body-strong-weight | var( --kui-typography-weight-medium, 500 ) | the same | the base | |
--kui-typography-t-body-tracking | 0px | the same | the base | |
--kui-typography-t-body-weight | 400 | the same | the base | |
--kui-typography-t-caption-font | var( --kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ) | the same | the base | |
--kui-typography-t-caption-line-height | 16px | the same | the base | |
--kui-typography-t-caption-size | 12px | the same | the base | |
--kui-typography-t-caption-tracking | 0px | the same | the base | |
--kui-typography-t-caption-weight | 500 | the same | the base | |
--kui-typography-t-display-font | var( --kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif ) | the same | the base | |
--kui-typography-t-display-line-height | 52px | the same | the base | |
--kui-typography-t-display-size | 44px | the same | the base | |
--kui-typography-t-display-tracking | -0.66px | the same | the base | |
--kui-typography-t-display-weight | 300 | the same | the base | |
--kui-typography-t-figure-font | var( --kui-typography-font-family-mono, 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace ) | the same | the base | |
--kui-typography-t-figure-large-font | var( --kui-typography-font-family-mono, 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace ) | the same | the base | |
--kui-typography-t-figure-large-line-height | 30px | the same | the base | |
--kui-typography-t-figure-large-size | 24px | the same | the base | |
--kui-typography-t-figure-large-tracking | 0px | the same | the base | |
--kui-typography-t-figure-large-weight | var( --kui-typography-weight-medium, 500 ) | the same | the base | |
--kui-typography-t-figure-line-height | 20px | the same | the base | |
--kui-typography-t-figure-size | 15px | the same | the base | |
--kui-typography-t-figure-small-font | var( --kui-typography-font-family-mono, 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace ) | the same | the base | |
--kui-typography-t-figure-small-line-height | 18px | the same | the base | |
--kui-typography-t-figure-small-size | 13px | the same | the base | |
--kui-typography-t-figure-small-tracking | 0px | the same | the base | |
--kui-typography-t-figure-small-weight | var( --kui-typography-weight-medium, 500 ) | the same | the base | |
--kui-typography-t-figure-tracking | 0px | the same | the base | |
--kui-typography-t-figure-weight | 500 | the same | the base | |
--kui-typography-t-headline-font | var( --kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif ) | the same | the base | |
--kui-typography-t-headline-line-height | 40px | the same | the base | |
--kui-typography-t-headline-size | 34px | the same | the base | |
--kui-typography-t-headline-tracking | -0.34px | the same | the base | |
--kui-typography-t-headline-weight | 300 | the same | the base | |
--kui-typography-t-hero-font | var( --kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif ) | the same | the base | |
--kui-typography-t-hero-line-height | 58px | the same | the base | |
--kui-typography-t-hero-size | 52px | the same | the base | |
--kui-typography-t-hero-tracking | -0.78px | the same | the base | |
--kui-typography-t-hero-weight | 300 | the same | the base | |
--kui-typography-t-label-font | var( --kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ) | the same | the base | |
--kui-typography-t-label-line-height | 18px | the same | the base | |
--kui-typography-t-label-size | 13px | the same | the base | |
--kui-typography-t-label-strong-font | var( --kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ) | the same | the base | |
--kui-typography-t-label-strong-line-height | 20px | the same | the base | |
--kui-typography-t-label-strong-size | 15px | the same | the base | |
--kui-typography-t-label-strong-tracking | 0px | the same | the base | |
--kui-typography-t-label-strong-weight | var( --kui-typography-weight-semibold, 600 ) | the same | the base | |
--kui-typography-t-label-tracking | 0px | the same | the base | |
--kui-typography-t-label-weight | 500 | the same | the base | |
--kui-typography-t-section-font | var( --kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif ) | the same | the base | |
--kui-typography-t-section-line-height | 28px | the same | the base | |
--kui-typography-t-section-size | 22px | the same | the base | |
--kui-typography-t-section-tracking | 0px | the same | the base | |
--kui-typography-t-section-weight | 300 | the same | the base | |
--kui-typography-t-title-font | var( --kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif ) | the same | the base | |
--kui-typography-t-title-line-height | 38px | the same | the base | |
--kui-typography-t-title-size | 32px | the same | the base | |
--kui-typography-t-title-tracking | 0px | the same | the base | |
--kui-typography-t-title-weight | 300 | the same | the base |