← Colors in interface design

Using Chestnut (#742802) in Interface Design: Scale, Buttons and Dark Mode

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

Chestnut (#742802) is a dark, moderately saturated brown. 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 Chestnut

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 Chestnut and moves only the lightness. The step closest to Chestnut keeps its exact value.

StepHexContrast on whiteBest text on it
50#FFF4F01.07:1#111111
100#FDE5DD1.20:1#111111
200#FAD0C11.41:1#111111
300#EFB0981.85:1#111111
400#D98B6E2.66:1#111111
500#C06D4C3.79:1#111111
600#A357395.27:1#FFFFFF
700#8543297.41:1#FFFFFF
800#74280210.25:1#FFFFFF
900#4D231213.42:1#FFFFFF
950#2E110617.51: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 Chestnut itself, so the button stays in family.

StateBackgroundLabelLabel contrast
Default#742802#FFFFFF10.25:1
Hover#6D2502#FFFFFF10.96:1
Pressed#672302#FFFFFF11.55:1
Disabled#D8D0CE#6B72803.18: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 Chestnut (#742802), which reaches 3 to 1 against a white page, the minimum for interface parts.

Dark mode

On a near-black page (#0F1115), Chestnut reaches 1.84:1 (Fail). That is not enough for text, so lighten it. Clay (#BB6848) is the closest lightness of the same hue that reaches 4.5 to 1.

Links and text

Chestnut on white reaches 10.25:1 (AAA), 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 Chestnut make quiet surfaces that feel connected to the brand without competing with it. Snow (#F9F8F8) works as a card or page tint, and Bride (#E9E5E5) as a border or divider.

The CSS

CSS variablescss
:root {
  --brand: #742802;
  --brand-hover: #6D2502;
  --brand-active: #672302;
  --on-brand: #FFFFFF;
  --brand-surface: #F9F8F8;
  --brand-border: #E9E5E5;
  --brand-text: #742802;
  --focus-ring: #742802;
}

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

A short checklist

  1. Use Chestnut 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.