Using Indigo (#4B0082) in Interface Design: Scale, Buttons and Dark Mode
A working design system from Indigo #4B0082: a 50 to 950 scale, button states with contrast, a dark-mode version, an accessible link color and the CSS to paste in.
Indigo (#4B0082) is a dark, vivid 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 Indigo
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 Indigo and moves only the lightness. The step closest to Indigo keeps its exact value.
| Step | Hex | Contrast on white | Best text on it |
|---|---|---|---|
| 50 | #F8F5FF | 1.07:1 | #111111 |
| 100 | #EFE7FE | 1.19:1 | #111111 |
| 200 | #E1D2FC | 1.41:1 | #111111 |
| 300 | #CEB0FE | 1.86:1 | #111111 |
| 400 | #B486F5 | 2.73:1 | #111111 |
| 500 | #9B66DF | 3.91:1 | #111111 |
| 600 | #824FBF | 5.49:1 | #FFFFFF |
| 700 | #693C9D | 7.68:1 | #FFFFFF |
| 800 | #502C7A | 10.59:1 | #FFFFFF |
| 900 | #4B0082 | 12.95:1 | #FFFFFF |
| 950 | #220E39 | 17.64: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 Indigo itself, so the button stays in family.
| State | Background | Label | Label contrast |
|---|---|---|---|
| Default | #4B0082 | #FFFFFF | 12.95:1 |
| Hover | #46007B | #FFFFFF | 13.57:1 |
| Pressed | #420074 | #FFFFFF | 14.15:1 |
| Disabled | #D2CEDB | #6B7280 | 3.12: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 Indigo (#4B0082), which reaches 3 to 1 against a white page, the minimum for interface parts.
Dark mode
On a near-black page (#0F1115), Indigo reaches 1.45:1 (Fail). That is not enough for text, so lighten it. Amethyst (#9762DB) is the closest lightness of the same hue that reaches 4.5 to 1.
Links and text
Indigo on white reaches 12.95: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 Indigo make quiet surfaces that feel connected to the brand without competing with it. Snow (#F9F8FA) works as a card or page tint, and Bride (#E7E5EB) as a border or divider.
The CSS
:root {
--brand: #4B0082;
--brand-hover: #46007B;
--brand-active: #420074;
--on-brand: #FFFFFF;
--brand-surface: #F9F8FA;
--brand-border: #E7E5EB;
--brand-text: #4B0082;
--focus-ring: #4B0082;
}
@media (prefers-color-scheme: dark) {
:root {
--brand: #9762DB;
--brand-text: #9762DB;
}
}A short checklist
- Use Indigo for the one action you most want people to take.
- Put #FFFFFF text on it and check that the ratio stays above 4.5 to 1.
- Use the scale for hover, pressed, border and surface colors rather than inventing new ones.
- Define a separate dark-mode value and test it on a dark page.
- Never use the color as the only signal: add an icon, a label or an underline.