Color Palette Generator
Generate color harmonies and 50–950 shade scales from one color, then export CSS variables or a Tailwind config.
Three colors evenly spaced 120° apart: vivid but balanced.
Shades of primary
Evenly spaced in OKLCH; ★ marks your color.:root {
--primary-50: #f0f9ff;
--primary-100: #dff2ff;
--primary-200: #c0e6ff;
--primary-300: #8ed3ff;
--primary-400: #4fbcfa;
--primary-500: #0ea5e9;
--primary-600: #0089c4;
--primary-700: #0070a1;
--primary-800: #005b84;
--primary-900: #004b6d;
--primary-950: #002e45;
--secondary-50: #fff4f9;
--secondary-100: #ffe1f0;
--secondary-200: #ffc3e2;
--secondary-300: #ff96d0;
--secondary-400: #ff53bd;
--secondary-500: #e90ea5;
--secondary-600: #c6008b;
--secondary-700: #a60074;
--secondary-800: #8b0060;
--secondary-900: #770052;
--secondary-950: #500036;
--accent-50: #f3ffe5;
--accent-100: #e5ffc6;
--accent-200: #caf88e;
--accent-300: #a5e90e;
--accent-400: #8dc800;
--accent-500: #77aa00;
--accent-600: #628d00;
--accent-700: #4f7200;
--accent-800: #3f5c00;
--accent-900: #344d00;
--accent-950: #1f3100;
}About this tool
A color palette is the small set of colors a product uses again and again: a primary brand color, one or two supporting colors, neutrals for text and surfaces, and shades of each for hover states, borders and backgrounds. Color harmonies are proven ways to pick colors that work together, based on their positions on the color wheel: opposite colors contrast strongly, neighboring colors feel calm, and evenly spaced colors look lively but balanced.
This generator starts from one color and builds seven classic harmonies. For each color it also creates an eleven-step scale from 50 to 950, the same naming Tailwind CSS and most design systems use. The steps are spaced evenly in the OKLCH color space, so the jump from 100 to 200 looks as large as the jump from 700 to 800, and your original color stays exactly as entered. Rename the colors, then export them as CSS custom properties, SCSS variables, a Tailwind v3 config, a Tailwind v4 @theme block or JSON.
How to use Color Palette Generator
- Pick a base color with the picker or type a hex code. Press Space or Random for inspiration.
- Choose a harmony such as Complementary or Triadic. Each swatch shows its hex code and contrast ratio with the best text color.
- Click a swatch to see its 50–950 shades, and rename colors to match their role (primary, accent…).
- Choose an export format, decide whether to include the shades, and copy or download the code.
Examples
Triadic palette from sky blue
Base #0ea5e9, harmony Triadic
#0ea5e9 #e90ea5 #a5e90e
Shade scale
#0ea5e9
50 #f0f9ff · 100 #dff2ff · 300 #8ed3ff · 500 #0ea5e9 · 700 #0070a1 · 900 #004b6d · 950 #002e45
The base color has a lightness close to Tailwind’s 500 step, so it is placed there and the other steps are built around it.
CSS variables export
Complementary, names primary and secondary, without shades
:root {
--primary: #0ea5e9;
--secondary: #e9520e;
} The harmonies explained
- Complementary: two colors 180° apart. Strong contrast; use one as the main color and the other for small accents such as buttons.
- Analogous: neighbors 30° apart. Calm and cohesive, good for backgrounds and illustrations; add a neutral for text.
- Triadic: three colors 120° apart. Vibrant and balanced; let one dominate and use the others sparingly.
- Split complementary: the base plus the two colors next to its complement. Almost as much contrast as complementary, with less tension.
- Tetradic and square: four colors. Rich but hard to balance; they work best with one dominant color and muted versions of the rest.
- Monochromatic: one hue in several lightness levels. Always harmonious and a safe choice for interfaces.
Using the 50–950 scale
A common convention is: 50–100 for page and card backgrounds, 200–300 for borders and disabled states, 400–500 for icons and decorative elements, 600–700 for buttons and links, and 800–950 for text and dark-mode surfaces. Because the steps follow perceived lightness, the same step number in different hues has similar contrast, which makes accessible combinations predictable.
Always check contrast in the final pairing: normal text needs at least 4.5:1 against its background under WCAG AA, and large text or UI components need 3:1. The ratio shown on each swatch is for black or white text, whichever is better; use the color converter to test any other combination.
Frequently asked questions
Everything you need to know about this tool and data security.
Why does my palette look different from Adobe Color?
Adobe Color uses a painter’s RYB color wheel by default, where the complement of blue is orange. This tool rotates hues on the RGB/HSL wheel used by CSS, so results differ a little. Both are valid; screen-based design tools and CSS hsl() follow the RGB wheel.
How do I use the export in Tailwind CSS?
For Tailwind v3, merge the colors object into theme.extend.colors in tailwind.config.js; you can then write bg-primary-500 or text-accent-700. For Tailwind v4, paste the @theme block into your main CSS file; the --color-* variables create the same utilities without a config file.
Why use OKLCH for the shades instead of simply mixing with white and black?
Mixing with white or black in sRGB makes light shades look washed out and dark shades muddy, and yellows and blues end up with very different perceived lightness at the same step. OKLCH separates lightness from chroma and hue, so each step keeps the character of the color and has a predictable brightness.
Is my data safe when using this tool?
Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.
Related Tools
Convert colors between HEX, RGB, HSL, HWB, OKLCH, HSV and CMYK, and check WCAG contrast.
Pick exact colors from any image and extract its dominant color palette. Your image never leaves the browser.
Design linear, radial and conic CSS gradients visually and copy the CSS or Tailwind classes.
Featured Projects tech-fun.net
Explore more AI & productivity tools
Nihongo GameBox
Master Japanese typing, Kana, and JLPT N5–N1 vocabulary through interactive retro arcade games.
ResumeGPT
Tailors CVs and cover letters to every job opportunity with a multi-agent LLM pipeline, job tracking, and scheduled discovery.
CollectMind
Turns your bookmarks into a searchable AI knowledge base — entirely on-device, powered by Chrome's built-in Gemini Nano.