Kanso's colours

  • --kui-color-accent-on-ink

    Light #fafafa Dark #121212

    Contrast on paper: light 1.0:1, dark 1.0:1

    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

    Light #e9e9e9 Dark #2b2b2b

    Contrast on-accent-soft on accent-soft: light 14.3:1, dark 11.9:1

    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

    Light #1a1a1a Dark #ececec

    Contrast on-accent on accent: light 16.6:1, dark 15.8:1

    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

    Light #ffe7cc Dark #4a2a00

    Contrast on-caution-soft on caution-soft: light 9.5:1, dark 10.0:1

    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

    Light #ffc27a Dark #7a4600

    Contrast on paper: light 1.5:1, dark 2.4:1

    The second colour of the late hatch inside a meter, between caution stripes. A pattern only, never text.

  • --kui-color-caution

    Light #b25b00 Dark #ffb870

    Contrast on paper: light 4.5:1, dark 11.0:1

    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

    Light #e9e9e9 Dark #2b2b2b

    Contrast on paper: light 1.1:1, dark 1.3:1

    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

    Light #fcdedc Dark #4d1512

    Contrast on-critical-soft on critical-soft: light 10.6:1, dark 11.3:1

    Fill of the critical inline alert.

  • --kui-color-critical

    Light #b3261e Dark #f2b8b5

    Contrast on-critical on critical: light 6.5:1, dark 7.6:1

    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

    Light #e3e3e3 Dark #333333

    Contrast on paper: light 1.2:1, dark 1.4:1

    Hairlines between list rows and table rows, and decorative borders. Never the only boundary of a control: controls take outline.

  • --kui-color-focus-ring

    Light #1a1a1a Dark #ececec

    Contrast on paper: light 16.6:1, dark 15.8:1

    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

    Light #5c5c5c Dark #b3b3b3

    Contrast on paper: light 6.4:1, dark 8.9:1

    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

    Light #1a1a1a Dark #ececec

    Contrast on-ink on ink: light 16.6:1, dark 15.8:1

    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

    Light #f2b8b5 Dark #b3261e

    Contrast on paper: light 1.6:1, dark 2.8:1

    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

    Light #ffffff Dark #1c1c1c

    Contrast on paper: light 1.0:1, dark 1.0:1

    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

    Light #fce3dc Dark #4a1a10

    Contrast on-negative-soft on negative-soft: light 10.8:1, dark 11.1:1

    Fill of the negative badge.

  • --kui-color-negative

    Light #a63a1f Dark #ffb4a1

    Contrast on-negative on negative: light 6.1:1, dark 10.9:1

    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

    Light #1a1a1a Dark #ececec

    Contrast on accent-soft: light 14.3:1, dark 11.9:1

    Text and icons on accent-soft. The base is ink: 14.3:1 in light, 12.0:1 in dark.

  • --kui-color-on-accent

    Light #fafafa Dark #121212

    Contrast on accent: light 16.6:1, dark 15.8:1

    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

    Light #5c2e00 Dark #ffddb3

    Contrast on caution-soft: light 9.5:1, dark 10.0:1

    Text on caution-soft: 9.5:1 in light, 10.0:1 in dark.

  • --kui-color-on-critical-soft

    Light #5f0e0a Dark #ffdad6

    Contrast on critical-soft: light 10.6:1, dark 11.3:1

    Text on critical-soft: 10.7:1 in light, 11.0:1 in dark.

  • --kui-color-on-critical

    Light #ffffff Dark #601410

    Contrast on critical: light 6.5:1, dark 7.6:1

    Text on critical fills, such as a destructive button: 6.5:1 in light, 7.7:1 in dark.

  • --kui-color-on-ink

    Light #fafafa Dark #121212

    Contrast on ink: light 16.6:1, dark 15.8:1

    Text and icons on ink fills: 16.7:1 in light and 15.9:1 in dark.

  • --kui-color-on-negative-soft

    Light #5a1a0a Dark #ffdad0

    Contrast on negative-soft: light 10.8:1, dark 11.1:1

    Text on negative-soft: 10.8:1 in light, 11.2:1 in dark.

  • --kui-color-on-positive-soft

    Light #0b3a1b Dark #c6f2d2

    Contrast on positive-soft: light 10.9:1, dark 10.3:1

    Text on positive-soft: 10.9:1 in light, 10.3:1 in dark.

  • --kui-color-on-spotlight-button

    #1a1a1a

    Contrast on spotlight-button: light 16.6:1, dark 17.4:1

    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)

    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

    Contrast on spotlight: light 17.4:1, dark 14.1:1

    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

    Light #8a8a8a Dark #8c8c8c

    Contrast on paper: light 3.3:1, dark 5.5:1

    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

    Light #fafafa Dark #121212

    Contrast ink on paper: light 16.6:1, dark 15.8:1

    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

    Light #ddf2e2 Dark #123a20

    Contrast on-positive-soft on positive-soft: light 10.9:1, dark 10.3:1

    Fill of the positive badge and the positive inline alert.

  • --kui-color-positive

    Light #1e6b35 Dark #7bd99a

    Contrast on-positive on positive: light 6.2:1, dark 10.9:1

    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

    Light rgba(0, 0, 0, 0.4) Dark rgba(0, 0, 0, 0.6)

    Behind a dialog or a modal sheet. The value carries its own opacity.

  • --kui-color-shadow

    #000000

    Contrast on paper: light 20.1:1, dark 1.1:1

    The ink of elevation shadows: black, as every Kanso shadow is drawn.

  • --kui-color-spotlight-button

    Light #fafafa Dark #ffffff

    Contrast on-spotlight-button on spotlight-button: light 16.6:1, dark 17.4:1

    The main action inside the spotlight card: a paper pill.

  • --kui-color-spotlight-line

    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

    Light rgba(255, 255, 255, 0.16) Dark rgba(255, 255, 255, 0.14)

    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

    Light #1a1a1a Dark #2b2b2b

    Contrast on-spotlight on spotlight: light 17.4:1, dark 14.1:1

    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

    Light #f0f0f0 Dark #262626

    Contrast on paper: light 1.0:1, dark 1.2:1

    Recessed fills on paper or surface: the search field, the segmented control's track, hover and pressed rows. Never a card.

The product roles, in a sample

The roles a product sets, here in the sample product colour, violet, kanso-ui-core’s demoProductThemes.violet, which belongs to no product. Each product supplies its own through defineProductTheme, which checks every pair against Kanso’s contrast targets in both schemes. Every role that follows these, kui-color-primary and the focus ring among them, follows the product; every other colour stays the base’s.

  • --kui-color-accent

    Light #6b3fa0 Dark #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-on-accent

    Light #ffffff Dark #2a0d4a

    Text and icons on accent fills. The base is on-ink: 16.7:1 in light, 15.9:1 in dark.

  • --kui-color-accent-soft

    Light #efe6f8 Dark #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-on-accent-soft

    Light #3f1d63 Dark #eadcfc

    Text and icons on accent-soft. The base is ink: 14.3:1 in light, 12.0:1 in dark.

  • --kui-color-accent-on-ink

    Light #c9a8f0 Dark #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-spotlight

    Light #6b3fa0 Dark #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-on-spotlight

    #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-on-spotlight-muted

    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-spotlight-button

    Light #fafafa Dark #ffffff

    The main action inside the spotlight card: a paper pill.

  • --kui-color-on-spotlight-button

    #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-spotlight-tonal

    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-line

    rgba(255, 255, 255, 0.6)

    The border of an outlined button inside the spotlight card: 3.8:1 on spotlight.

Material Design roles

The roles kanso-ui’s components read today, each the Kanso colour it takes until its component moves to Kanso’s own.

RoleTakesLightDark
--kui-color-backgroundpaper#fafafa#121212
--kui-color-error-containercritical-soft#fcdedc#4d1512
--kui-color-errorcritical#b3261e#f2b8b5
--kui-color-inverse-on-surfaceon-ink#fafafa#121212
--kui-color-inverse-primaryaccent-on-ink#fafafa#121212
--kui-color-inverse-surfaceink#1a1a1a#ececec
--kui-color-negative-containernegative-soft#fce3dc#4a1a10
--kui-color-on-backgroundink#1a1a1a#ececec
--kui-color-on-error-containeron-critical-soft#5f0e0a#ffdad6
--kui-color-on-erroron-critical#ffffff#601410
--kui-color-on-negative-containeron-negative-soft#5a1a0a#ffdad0
--kui-color-on-negativepaper#fafafa#121212
--kui-color-on-positive-containeron-positive-soft#0b3a1b#c6f2d2
--kui-color-on-positivepaper#fafafa#121212
--kui-color-on-primary-containeron-accent-soft#1a1a1a#ececec
--kui-color-on-primary-fixed-varianton-accent-soft#1a1a1a#ececec
--kui-color-on-primary-fixedon-accent-soft#1a1a1a#ececec
--kui-color-on-primaryon-accent#fafafa#121212
--kui-color-on-secondary-containerink#1a1a1a#ececec
--kui-color-on-secondary-fixed-varianton-accent-soft#1a1a1a#ececec
--kui-color-on-secondary-fixedon-accent-soft#1a1a1a#ececec
--kui-color-on-secondaryon-ink#fafafa#121212
--kui-color-on-surface-variantink-muted#5c5c5c#b3b3b3
--kui-color-on-surfaceink#1a1a1a#ececec
--kui-color-on-tertiary-containeron-accent-soft#1a1a1a#ececec
--kui-color-on-tertiary-fixed-varianton-accent-soft#1a1a1a#ececec
--kui-color-on-tertiary-fixedon-accent-soft#1a1a1a#ececec
--kui-color-on-tertiaryon-accent-soft#1a1a1a#ececec
--kui-color-outline-variantdivider#e3e3e3#333333
--kui-color-positive-containerpositive-soft#ddf2e2#123a20
--kui-color-primary-containeraccent-soft#e9e9e9#2b2b2b
--kui-color-primary-fixed-dimaccent-soft#e9e9e9#2b2b2b
--kui-color-primary-fixedaccent-soft#e9e9e9#2b2b2b
--kui-color-primaryaccent#1a1a1a#ececec
--kui-color-secondary-containercontainer#e9e9e9#2b2b2b
--kui-color-secondary-fixed-dimaccent-soft#e9e9e9#2b2b2b
--kui-color-secondary-fixedaccent-soft#e9e9e9#2b2b2b
--kui-color-secondaryink#1a1a1a#ececec
--kui-color-surface-brightkanso-surface#ffffff#1c1c1c
--kui-color-surface-container-highkanso-surface#ffffff#1c1c1c
--kui-color-surface-container-highestsurface-sunken#f0f0f0#262626
--kui-color-surface-container-lowkanso-surface#ffffff#1c1c1c
--kui-color-surface-container-lowestkanso-surface#ffffff#1c1c1c
--kui-color-surface-containerkanso-surface#ffffff#1c1c1c
--kui-color-surface-dimpaper#fafafa#121212
--kui-color-surface-tintaccent#1a1a1a#ececec
--kui-color-surface-variantsurface-sunken#f0f0f0#262626
--kui-color-surfacepaper#fafafa#121212
--kui-color-tertiary-containeraccent-soft#e9e9e9#2b2b2b
--kui-color-tertiary-fixed-dimaccent-soft#e9e9e9#2b2b2b
--kui-color-tertiary-fixedaccent-soft#e9e9e9#2b2b2b
--kui-color-tertiaryaccent-soft#e9e9e9#2b2b2b