Color Palette Generator

Pick a base color and instantly generate a harmonious palette using color theory. Choose from six harmony rules, fine-tune the results, and export as CSS variables, SCSS, or JSON — everything runs in your browser.

Base color
Harmony
Shades
CSS Variables
❤️ Support CodeConverter.net and donate ❤️

Color theory for developers and designers

What is a color harmony?

Color harmonies are combinations of colors that look pleasing together based on their positions on the color wheel. Rather than picking colors arbitrarily, using a harmony rule ensures the resulting palette has an inherent visual logic — colors feel like they belong together because they have a mathematical relationship in HSL or HSV color space. This is exactly how professional designers and design systems define their brand palettes.

This tool works in HSL space (Hue, Saturation, Lightness) which is the most intuitive model for manipulating colors programmatically. Hue is the pure color angle (0–360°), saturation controls intensity, and lightness controls how light or dark it is. All harmony calculations simply rotate the hue wheel by specific angles while keeping saturation and lightness constant.

Complementary
  • Two colors directly opposite on the wheel (180°)
  • Maximum contrast — bold, energetic pairings
  • Great for CTAs, highlights, and accent colors
  • Classic example: blue & orange, red & green
Analogous
  • Three adjacent colors (±30° from base)
  • Harmonious and natural — found in nature
  • Ideal for backgrounds, gradients, and UIs
  • Lacks contrast — add a neutral for balance
Triadic
  • Three colors evenly spaced (120° apart)
  • Vibrant and balanced — strong visual variety
  • Let one color dominate for best results
  • Classic example: red, yellow, blue
Tetradic
  • Four colors forming a rectangle (90° steps)
  • Rich palette — hardest to balance
  • Works best when warm and cool tones are balanced
  • Great for complex, multi-section UIs
Monochromatic
  • Same hue, varying lightness and saturation
  • Elegant, cohesive, and never clash
  • Common in dark-mode and minimalist designs
  • Great foundation for a token-based design system
Export formats
  • CSS variables — ready to paste into :root {}
  • SCSS$variable map for Sass projects
  • JSON — design tokens for Figma, Style Dictionary, etc.
  • Hex list — plain list for quick copying

Using color palettes in design systems

A well-chosen color palette is the cornerstone of any design system. The recommended approach is to define your palette as CSS custom properties (variables) in the :root selector, then reference those variables throughout your stylesheets — never hard-code hex values in component styles. This way, changing a single variable instantly updates the entire UI.

For design tokens that span multiple tools (Figma, code, iOS, Android), JSON is the standard interchange format used by tools like Style Dictionary and the W3C Design Token spec. Export your palette as JSON from this tool and feed it directly into your token pipeline.