Color Palette Generator: How to Build Harmonious Color Schemes
Generate a harmonious color palette for your project.
Open Palette Generator ↗Color Harmony Types
Color harmony refers to aesthetically pleasing combinations of colors based on their positions on the color wheel. The color wheel is based on HSL hue (0–360°):
- Monochromatic — one hue, multiple lightness/saturation values. Clean, cohesive, never clashes. Best for minimal, sophisticated designs.
- Analogous — colors adjacent on the wheel (±30°). Harmonious and natural-looking. Common in nature-inspired designs.
- Complementary — opposite colors (180° apart). High contrast, vibrant. Use one as dominant, the other as accent.
- Split-complementary — a base color plus two colors flanking its complement (±30°). High contrast but less stark than complementary.
- Triadic — three colors evenly spaced (120° apart). Vibrant and balanced. Challenging to use well — usually one dominant, two accents.
- Tetradic/Square — four colors (90° apart or two complementary pairs). Rich but complex. Works best with one dominant color.
Using the Generator
Pick a starting color using the color picker, type a HEX code, or click 'Random' for inspiration.
Choose from monochromatic, analogous, complementary, split-complementary, triadic, or tetradic. The preview generates the palette instantly.
Click the lock icon on any color swatch to keep it while randomizing the rest. This lets you iterate from a base you love.
Download as a PNG swatch image, copy individual HEX codes, or export all values as CSS custom properties.
Exporting as CSS Variables
The generator can export your palette as CSS custom properties (variables), ready to paste into your stylesheet:
:root {
--color-primary: #3b82f6;
--color-secondary: #8b5cf6;
--color-accent: #f59e0b;
--color-neutral: #64748b;
--color-background: #0f172a;
--color-surface: #1e293b;
--color-text: #e2e8f0;
}
Using CSS variables makes it easy to maintain and adjust your design system — change a value once and it updates everywhere.
Accessibility and Contrast
A beautiful palette is useless if text can't be read over it. WCAG 2.1 requires:
- 4.5:1 contrast ratio for normal text (level AA)
- 3:1 for large text (18pt+ or 14pt+ bold)
- 7:1 for enhanced readability (level AAA)
Dark text on light backgrounds and light text on dark backgrounds generally pass. Problem combinations: gray text on white, yellow text on white, light blue text on white. Always test text-on-background combinations with a contrast checker.
Tips for Designers and Developers
- 60-30-10 rule — in interior design and by extension UI design, use your dominant color for 60% of the surface area, a secondary color for 30%, and an accent color for 10%.
- Neutral is your friend — most professional palettes are 80% neutral (whites, grays, dark backgrounds) with 20% chromatic color. Bold, saturated palettes work in small doses.
- Generate tints and shades — for a design system, you need 5–10 shades of each color (50, 100, 200...900). Generate a base color and create variants by adjusting HSL lightness from 95% (near white) to 15% (near black).
- Test in context — colors look different against different backgrounds due to simultaneous contrast. Always test your palette on the actual background it will be used on.
