How to Pick the Right Colors for UI

Learn the HSL color model for UI design. Build complete color palettes, generate shades from a single hue, and master dark mode with this interactive guide.

Why HSL Beats Hex and RGB

Most designers start with hex codes like #3B82F6 — but those are nearly impossible to reason about. What color is #6D28D9? You'd have to look it up.

HSL (Hue, Saturation, Lightness) maps directly to how we think about color. Hue is the color wheel (0-360°), saturation is how vivid it is (0-100%), and lightness is how bright (0-100%). Once you pick a hue, you can generate an entire palette just by adjusting lightness.

*

Set saturation to 0 and you get perfect neutrals. That's your gray scale — no more guessing which gray to use.

Building a Full Palette from One Hue

Here's the system: pick one hue for your brand. Then generate 10 shades by stepping through lightness values: 95, 90, 80, 65, 50, 40, 30, 20, 13, 7. That gives you everything from near-white tints to near-black shades.

For neutrals, use the same approach but with 0% saturation. This gives you a consistent gray scale that feels cohesive with your brand colors.

Interactive Demo
Brand Palette
50
100
200
300
400
500
600
700
800
900
Neutrals (0 saturation)
N100
N200
N300
N400
N500
N600
N700
N800
Preview
Card Title
This is how your color palette looks in a real UI context. Adjust hue and saturation to explore different moods.

HSL is the best color model for UI design. Control lightness for shades, set saturation to 0 for neutrals, and derive dark mode by using low lightness values (0-10%).

Dark Mode Is Just Low Lightness

The biggest insight about dark mode: it's not about inverting colors. It's about using the bottom of your lightness scale. Your background becomes 5-7% lightness, cards sit at 10-13%, and elevated elements at 15-20%.

For light mode, subtract from 100 instead. Background at 100%, cards at 97%, elevated at 95%. Same system, opposite end of the spectrum.

*

Never use pure black (#000) for dark mode backgrounds. 5-8% lightness with a hint of your brand hue feels much more refined.

Practical Color Tips

Use your 500 shade as the primary button color. Use 50/100 shades for light backgrounds and badges. Use 800/900 shades for text on light backgrounds.

For text on dark backgrounds, don't use pure white — use 85-95% lightness for headings and 55-65% for body text. This creates natural hierarchy without changing font size.

Key Takeaways

HSL is the best color model for UI work — it maps to how we think about color
Generate full palettes from a single hue by stepping through lightness values
Dark mode = low lightness (5-20%), light mode = high lightness (80-100%)
Set saturation to 0 for perfect neutrals
Use lightness for text hierarchy: 90%+ for headings, 60% for body text on dark backgrounds
Never use pure black (#000) or pure white (#fff) — always slightly off

Related Guides & Tools

Want the full picture?

This free tool checks one slice of UX. Picopi audits your entire page — issues, screenshots, and fixes — web or mobile.