← Colors in interface design

Using Bancha (#666A47) in Interface Design: Scale, Buttons and Dark Mode

A working design system from Bancha #666A47: a 50 to 950 scale, button states with contrast, a dark-mode version, an accessible link color and the CSS to paste in.

Bancha (#666A47) is a medium, muted yellow. As an interface color it has a clear personality: it is dark enough to carry white labels, which makes it a natural button and header color. This guide shows how to build a working interface from it: a full scale, every button state, a dark-mode version, a link color that passes, and the CSS to paste in.

A scale built from Bancha

A single color is not enough for an interface. You need lighter steps for surfaces and borders and darker steps for text and hover states. This 50 to 950 scale keeps the hue and saturation of Bancha and moves only the lightness. The step closest to Bancha keeps its exact value.

StepHexContrast on whiteBest text on it
50#F7F7F31.07:1#111111
100#EBECE21.19:1#111111
200#DADDCB1.38:1#111111
300#C0C4A91.79:1#111111
400#A1A5842.55:1#111111
500#868A663.59:1#111111
600#666A475.64:1#FFFFFF
700#585B3E7.04:1#FFFFFF
800#42452D9.90:1#FFFFFF
900#30322013.10:1#FFFFFF
950#1A1C0F17.25:1#FFFFFF

Button states

Interactive elements need to look different when you hover, press and disable them, and each state still has to be readable. These values are made from Bancha itself, so the button stays in family.

StateBackgroundLabelLabel contrast
Default#666A47#FFFFFF5.64:1
Hover#606443#FFFFFF6.17:1
Pressed#5B5E3F#FFFFFF6.73:1
Disabled#D6D6D2#6B72803.31:1

Disabled controls are exempt from WCAG contrast rules, but they still need to be recognizable, so the label is kept dark enough to read. For keyboard focus, use an outline of Bancha (#666A47), which reaches 3 to 1 against a white page, the minimum for interface parts.

Dark mode

On a near-black page (#0F1115), Bancha reaches 3.34:1 (AA large). That is not enough for text, so lighten it. Wreath (#7D815D) is the closest lightness of the same hue that reaches 4.5 to 1.

Links and text

Bancha on white reaches 5.64:1 (AA), so it can be a link and heading color as it is. Links also need a second cue beyond color, such as an underline, because some readers cannot tell the link color from the surrounding text.

Surfaces and borders

Tints of Bancha make quiet surfaces that feel connected to the brand without competing with it. Snow (#F9F9F9) works as a card or page tint, and Bride (#E8E9E6) as a border or divider.

The CSS

CSS variablescss
:root {
  --brand: #666A47;
  --brand-hover: #606443;
  --brand-active: #5B5E3F;
  --on-brand: #FFFFFF;
  --brand-surface: #F9F9F9;
  --brand-border: #E8E9E6;
  --brand-text: #666A47;
  --focus-ring: #666A47;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #7D815D;
    --brand-text: #7D815D;
  }
}

A short checklist

  1. Use Bancha for the one action you most want people to take.
  2. Put #FFFFFF text on it and check that the ratio stays above 4.5 to 1.
  3. Use the scale for hover, pressed, border and surface colors rather than inventing new ones.
  4. Define a separate dark-mode value and test it on a dark page.
  5. Never use the color as the only signal: add an icon, a label or an underline.