Lesson 5 of 7 · 12 min
Building a UI palette
Goal:Build a practical interface palette with roles, tints and shades that pass contrast.
A brand palette of five lovely colors isn't enough for an interface. You need backgrounds, surfaces, borders, text in several strengths, a primary action color, and colors for success, warning and error, each in light and dark steps. That's a UI palette.
- Dominant · 60% backgrounds and large areas, usually a calm neutral.
- Secondary · 30% navigation, cards and text: supports the dominant color.
- Accent · 10% buttons and highlights: the few things that should pop.
Plants that like you back
Shop plantsThe parts of a UI palette
- Neutrals
- Grays (often slightly tinted) for backgrounds, borders and text. Most of an interface is neutral.
- Primary
- The color for main actions and key highlights. Usually the brand color.
- Semantic colors
- Colors with a job: success (often green), warning (often amber), error (often red), information (often blue).
- Tint / shade
- A color mixed towards white (tint) or towards black (shade). A ramp is a set of them in even steps.
- Ramp
- A numbered scale like 50 to 900, light to dark, so you can pick the right step for each job.
Build a ramp from any base color. Each step shows its contrast against white and black, so you can see which steps are safe for text.
Pick a base color. Find which steps can carry text on white, and which work as backgrounds.
- 50
#f3f1fd
on white 1.1
on black 18.8
- 100
#e2dffc
on white 1.3
on black 16.2
- 200
#c1b8fa
on white 1.8
on black 11.5
- 300
#9586f9
on white 3.0
on black 7.1
- 400
#644df9
on white 5.3
on black 4.0
- 500
#381af9
on white 7.8
on black 2.7
- 600
#2407df
on white 9.7
on black 2.2
- 700
#1f09ae
on white 12.3
on black 1.7
- 800
#190a80
on white 15.0
on black 1.4
- 900
#120854
on white 17.7
on black 1.2
■ Green numbers pass 4.5:1 for body text. Brand colors are often in the middle of the ramp and too light for text on white. Use a darker step for text and links, and the light steps for backgrounds and tags.
A recipe for a UI palette
Start with neutrals
Make a ramp of grays, slightly tinted towards your brand hue so they feel related.
Add one primary ramp
Build steps from your brand color. Find the step that passes 4.5:1 on white for links and text.
Add semantic ramps
Success, warning, error and info, each with a light background step and a dark text step.
Assign roles
Decide which step is the page background, a card, a border, body text, muted text, a button.
Test on real screens
Apply the palette to a form, a card and a chart before you call it done.
Your brand blue gives 3.1:1 against white. Can you use it for body links?
See it on real websites
Count the colors on each page. Notice how little of the page is the brand color.
Stripe
What to notice
- Calm neutrals for most of the page.
- One strong brand color saved for actions and highlights.
- Darker steps of the same hue for text links.
Airbnb
What to notice
- Mostly white and grays; photos bring the color.
- The pink-red brand color appears only on key actions.
- A good example of 60-30-10 in an app.
Build your first UI palette
From one brand color to a working palette.
- 1Choose a brand color (from your mood palette, or the bakery from Unit 2).
- 2Build a 50–900 ramp for it and a neutral ramp in Figma.
- 3Add success, warning and error colors, each with a light and a dark step.
- 4Save them as color styles or variables.
- 5Design one card and one form with only these colors, and check contrast.
Read next