← Colors in interface design

Using Lavish Spending (#8469BC) in Interface Design: Scale, Buttons and Dark Mode

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

Lavish Spending (#8469BC) is a medium, moderately saturated purple. As an interface color it has a clear personality: it is light enough that dark labels read better than white ones, which makes it better as a surface, a highlight or a data color than as a button. 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 Lavish Spending

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

StepHexContrast on whiteBest text on it
50#F7F5FE1.07:1#111111
100#EDE7FE1.20:1#111111
200#DED4FC1.40:1#111111
300#C7B5F31.85:1#111111
400#A992E02.66:1#111111
500#8469BC4.44:1#000000
600#775EAB5.28:1#FFFFFF
700#5F498C7.45:1#FFFFFF
800#48366C10.39:1#FFFFFF
900#35275113.45:1#FFFFFF
950#1E143117.50: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 Lavish Spending itself, so the button stays in family.

StateBackgroundLabelLabel contrast
Default#8469BC#0000004.72:1
Hover#7C63B2#FFFFFF4.90:1
Pressed#765DA8#FFFFFF5.38:1
Disabled#DBD6E9#6B72803.40: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 Lavish Spending (#8469BC), which reaches 3 to 1 against a white page, the minimum for interface parts.

Dark mode

On a near-black page (#0F1115), Lavish Spending reaches 4.25:1 (AA large). That is not enough for text, so lighten it. Lavish Spending (#8A6FC3) is the closest lightness of the same hue that reaches 4.5 to 1.

Links and text

Lavish Spending on white reaches only 4.44:1, which is not enough for text. For links and small headings use Lavish Spending (#8166B9), the closest shade that reaches 4.5 to 1, and keep Lavish Spending itself for fills and large display type.

Surfaces and borders

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

The CSS

CSS variablescss
:root {
  --brand: #8469BC;
  --brand-hover: #7C63B2;
  --brand-active: #765DA8;
  --on-brand: #000000;
  --brand-surface: #FAF9FC;
  --brand-border: #EBE9F2;
  --brand-text: #8166B9;
  --focus-ring: #8469BC;
}

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

A short checklist

  1. Use Lavish Spending for the one action you most want people to take.
  2. Put #000000 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.