← Colors in interface design

Using True Blue (#010FCC) in Interface Design: Scale, Buttons and Dark Mode

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

True Blue (#010FCC) is a dark, vivid blue. 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 True Blue

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

StepHexContrast on whiteBest text on it
50#F3F7FE1.07:1#111111
100#E2EBFF1.19:1#111111
200#CADBFD1.39:1#111111
300#A5C1FA1.80:1#111111
400#759FF72.60:1#111111
500#4A7EF63.74:1#111111
600#2059FB5.40:1#FFFFFF
700#1344D07.59:1#FFFFFF
800#010FCC10.81:1#FFFFFF
900#05227D13.71:1#FFFFFF
950#01104F17.67: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 True Blue itself, so the button stays in family.

StateBackgroundLabelLabel contrast
Default#010FCC#FFFFFF10.81:1
Hover#010DC1#FFFFFF11.48:1
Pressed#010CB7#FFFFFF12.08:1
Disabled#CECFED#6B72803.17: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 True Blue (#010FCC), which reaches 3 to 1 against a white page, the minimum for interface parts.

Dark mode

On a near-black page (#0F1115), True Blue reaches 1.74:1 (Fail). That is not enough for text, so lighten it. Azure (#3D74FB) is the closest lightness of the same hue that reaches 4.5 to 1.

Links and text

True Blue on white reaches 10.81: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 True Blue make quiet surfaces that feel connected to the brand without competing with it. Snow (#F8F8FC) works as a card or page tint, and Bride (#E5E5F5) as a border or divider.

The CSS

CSS variablescss
:root {
  --brand: #010FCC;
  --brand-hover: #010DC1;
  --brand-active: #010CB7;
  --on-brand: #FFFFFF;
  --brand-surface: #F8F8FC;
  --brand-border: #E5E5F5;
  --brand-text: #010FCC;
  --focus-ring: #010FCC;
}

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

A short checklist

  1. Use True Blue 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.