← Colors in interface design

Using Deadly Depths (#111144) in Interface Design: Scale, Buttons and Dark Mode

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

Deadly Depths (#111144) is a very dark, moderately saturated purple. 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 Deadly Depths

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

StepHexContrast on whiteBest text on it
50#F4F6FF1.07:1#111111
100#E6EAFB1.19:1#111111
200#D2D9F71.39:1#111111
300#B5BEEC1.81:1#111111
400#929ED62.59:1#111111
500#7681BE3.71:1#111111
600#606AA25.14:1#FFFFFF
700#4C54847.21:1#FFFFFF
800#383F6610.13:1#FFFFFF
900#282E4C13.24:1#FFFFFF
950#11114417.68: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 Deadly Depths itself, so the button stays in family.

StateBackgroundLabelLabel contrast
Default#111144#FFFFFF17.68:1
Hover#0F0F40#FFFFFF18.06:1
Pressed#0E0E3C#FFFFFF18.31:1
Disabled#CFCFD2#6B72803.10: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 Deadly Depths (#111144), which reaches 3 to 1 against a white page, the minimum for interface parts.

Dark mode

On a near-black page (#0F1115), Deadly Depths reaches 1.06:1 (Fail). That is not enough for text, so lighten it. Flood (#707BB7) is the closest lightness of the same hue that reaches 4.5 to 1.

Links and text

Deadly Depths on white reaches 17.68: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 Deadly Depths make quiet surfaces that feel connected to the brand without competing with it. Snow (#F8F8F9) works as a card or page tint, and Airy (#E5E5E6) as a border or divider.

The CSS

CSS variablescss
:root {
  --brand: #111144;
  --brand-hover: #0F0F40;
  --brand-active: #0E0E3C;
  --on-brand: #FFFFFF;
  --brand-surface: #F8F8F9;
  --brand-border: #E5E5E6;
  --brand-text: #111144;
  --focus-ring: #111144;
}

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

A short checklist

  1. Use Deadly Depths 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.