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.
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
Related Guides & Tools
How to Fix Boring UIs with Depth
Create visual depth with layered shades, shadows, and highlights.
GuideThe Golden Rule: Don't Make Me Think
Master the principles of effortless, convention-driven UI design.
GuideWeb Animations That Actually Matter
Master CSS transitions, timing functions, and animations that improve UX.
GuideThe Easy Way to Pick Right Spacing
Master rem-based spacing for consistent, beautiful layouts.
GuideTypography: The 80% of UI Design
Master type scales, weight, and color — the fundamentals of UI typography.
Want the full picture?
This free tool checks one slice of UX.
Picopi audits your entire page — issues, screenshots, and fixes — web or mobile.