Color Palette Generator
The Color Palette Generator turns one base colour into a complete, usable palette: a five-colour harmony set plus a 50–950 Tailwind-style shade scale, with lock-and-shuffle, per-swatch contrast badges, and free export as CSS variables, a Tailwind config snippet, or JSON.
How to Use
- 1
Pick a base colour with the colour picker or type a hex code such as #6366f1 — a brand colour from a logo works well.
- 2
Choose a harmony mode: complementary (opposite on the wheel), analogous (neighbours), triadic (triangle), split-complementary, or monochromatic (same hue, different lightness).
- 3
Lock any swatch you like, then Shuffle unlocked to re-roll the rest; Random palette replaces the base colour entirely.
- 4
Read each swatch's HEX, RGB and HSL, and its WCAG contrast against white and black — a badge that says Fail means that swatch should not carry body text on that background.
- 5
Check the 50–950 Tailwind-style scale under the palette: step 500 is your base colour, lighter steps head toward white and darker steps toward black. Click any step to copy its hex.
- 6
Export the palette as CSS variables, a Tailwind config snippet, or JSON — or upload an image to extract its dominant colours as a starting base (processed locally, never uploaded).
Frequently Asked Questions
What is a color palette?
What is a 50–950 color scale?
How many colors should a palette have?
Analogous vs complementary — when to use each?
How do I use this palette in Tailwind or CSS variables?
Will my palette be accessible?
How is the 50–950 scale built?
Can I extract a palette from an image?
Does it simulate color blindness?
Is my base color uploaded anywhere?
Generative Answer & AI Documentation
What is the Color Palette Generator?
The Color Palette Generator builds a colour palette from a single base colour. Type a hex code (or pick one visually) and choose a harmony mode, and the tool returns two things at once: a five-colour harmony palette — complementary, analogous, triadic, split-complementary, or monochromatic — and a 50–950 Tailwind-style shade scale in which step 500 is the base colour itself. Each swatch shows its HEX, RGB, and HSL values and its WCAG contrast ratio against white and black, with AA and AAA badges. You can lock individual swatches and shuffle the rest, generate a fully random palette, or upload an image and extract its dominant colours as a starting base. The whole palette exports as CSS variables, a Tailwind config snippet, or JSON — free, with no signup and no caps. Everything runs in your browser: the base colour and any uploaded image never leave the tab.
Why use Color Palette Generator offline?
Every design starts from one colour — a logo colour, a brand colour, a colour a client liked — and the hard part is everything after it: which colours go with it, which shade is the button and which is the hover state, and whether the text on top of it can actually be read. Guessing produces palettes that clash, and copying a palette from a screenshot produces colours you cannot reproduce in code. This tool answers the question with arithmetic instead of taste: harmony modes are fixed hue offsets on the colour wheel, so the result is reproducible and explainable, and the 50–950 scale gives every step a name (bg-brand-500, bg-brand-100) instead of a fresh hex invented per component. The contrast badges close the loop that most generators leave open: a palette is only useful if its colours can carry text, and this page tells you per swatch instead of making you check elsewhere.
When should you use this tool?
Use it when a project needs a colour system, not just a colour: starting a new site or app from a logo colour, building a Tailwind theme, picking a button/hover/disabled ladder, or replacing a random set of hex codes scattered through a stylesheet with one named scale. Use the harmony palette for the five colours a screen actually shows (background, surface, text, accent, border) and the 50–950 scale for the shades each of those colours needs (a light tint for a background, the base for a button, a dark shade for hover). Use the image mode when a photo or a brand asset already has the mood you want and you need its colours as hex codes. Do not use it as a substitute for testing: a generated palette is mathematically harmonious, not taste-tested, and it must be tried on real screens before it ships.
Key Benefits
- Two outputs in one pass: a five-colour harmony palette and a 50–950 Tailwind-style scale, where most generators offer one or the other.
- Five harmony modes — complementary, analogous, triadic, split-complementary, monochromatic — covering the standard colour-wheel relationships.
- Lock and shuffle: keep the swatches you like and re-roll the rest, the interaction Coolors users expect, with no account and no saved-palette cap.
- Free export in three formats: CSS variables, a Tailwind config snippet, and JSON — the export other tools put behind a paywall.
- Per-swatch WCAG contrast against white and black with AA/AAA badges, so text problems surface while you are still choosing colours.
- Extract from image: upload a photo and get its dominant colours as a starting base, processed locally with FileReader and Canvas.
- 100% private: no signup, no upload, no tracking — the base colour and any image stay in the tab.
Common Use Cases
- Building a brand palette from one logo colour: enter the logo hex, pick complementary or triadic, lock the two colours that feel right, shuffle the rest, and export the CSS variables.
- Creating a Tailwind theme: generate the 50–950 scale for the brand colour, paste the config snippet into tailwind.config.js, and use bg-brand-500 for buttons, bg-brand-100 for tinted backgrounds, and brand-700 for hover states.
- Designing a shadcn-style theme: take the scale's light steps for backgrounds and surfaces and its dark steps for foreground text, then verify each text pair in the WCAG Contrast Checker.
- Finding an accent colour: generate a complementary palette from a calm base (a blue, a green) and take the opposite-hue swatch as the one accent that will stand out — the 10% in the 60-30-10 rule.
- Extracting colours from a photograph: upload a hero image and use its dominant colours as the palette base, so the interface and the photography share a colour story.
Developer Notes & Best Practices
The harmony math is pure HSL hue rotation on the base colour's hue, saturation, and lightness. Complementary adds 180° to the hue for the second swatch and adds a light tint and a dark shade of the base plus a tint of the complement to reach five colours; analogous uses −60°, −30°, +30°, +60°; triadic uses +120° and +240°; split-complementary uses +150° and +210°; monochromatic keeps the hue and steps the lightness by −30, −15, +15, and +30 points. The 50–950 scale is built honestly and the page says so: step 500 is the base colour exactly, lighter steps interpolate its lightness toward 96% and darker steps toward 6%, keeping hue and saturation fixed. That is a simple lightness ladder, not a perceptually uniform (OKLCH) scale, so steps near the ends can look uneven. Per-swatch contrast uses the standard WCAG 2 relative-luminance ratio against white (#ffffff) and black (#000000), with AA at 4.5:1 and AAA at 7:1 for normal text. The image mode draws the uploaded file onto a canvas scaled to at most 120px on its longest side, samples every fourth pixel, buckets RGB values in steps of 32, and returns the five most common buckets — approximate by design, since near-identical shades merge into one bucket. Shuffle replaces unlocked swatches with random hex colours; locked swatches are untouched. Verified values used on this page: the complementary palette of #6366f1 is #6366f1, #f2ef64, #b9baf9, #1417e6, #f9f8b9, and its scale runs 50 #e8e8fd through 950 #04052f (computed by the same code the tool runs).
Harmony modes — what each one does
| Mode | Hue offsets from the base | Feels like | Use it for |
|---|---|---|---|
| Complementary | 0°, +180° (+ tints/shades) | High contrast, energetic | A call-to-action that must stand out |
| Analogous | −60°, −30°, 0°, +30°, +60° | Calm, cohesive | Dashboards, long reads, quiet interfaces |
| Triadic | 0°, +120°, +240° (+ tints/shades) | Balanced, varied | A palette that needs three distinct accents |
| Split-complementary | 0°, +150°, +210° (+ tints/shades) | Contrast without the clash | An accent pair softer than full complementary |
| Monochromatic | Same hue, lightness −30 / −15 / +15 / +30 | Safe, unified | One-colour designs where nothing may clash |
Applying a palette — the 60-30-10 rule
| Share | What it is | Which swatch |
|---|---|---|
| 60% | Dominant colour — backgrounds, large surfaces | The lightest scale steps (50–200) or a neutral |
| 30% | Secondary colour — panels, secondary surfaces | The base colour or a neighbouring harmony swatch |
| 10% | Accent — buttons, links, highlights | The complementary or triadic swatch — the one that contrasts |
The 50–950 scale — how each step is built
| Steps | How the lightness is set | Typical use |
|---|---|---|
| 50–400 | Base lightness interpolated toward 96% | Tinted backgrounds, hover tints, subtle surfaces |
| 500 | The base colour itself, unchanged | Default button, primary accent |
| 600–950 | Base lightness interpolated toward 6% | Hover states, dark text, dark mode surfaces |
- Start from the real brand colour, not a colour you like in isolation: the palette is only as good as the base, and a logo colour anchors every decision after it.
- Apply the 60-30-10 rule: roughly 60% of a screen in the dominant colour, 30% in a secondary, 10% in the accent. A palette with five equal-weight colours reads as noise.
- Use the scale, not fresh hex codes, for states: a button at 500, its hover at 600, its disabled state at 300 — named steps keep the system consistent.
- Check text contrast before shipping, not after: a swatch badge that says Fail means that colour cannot carry body text on that background — test the real pair in the WCAG Contrast Checker.
- Test the palette on a real screen at real sizes: a harmony that looks good as five equal swatches can fail as a heading, a paragraph, and a button together.
- Lock early: when two swatches feel right, lock them before shuffling, or the shuffle will throw away the part you already liked.
Common Mistakes
- Assuming a harmonious palette is automatically accessible: harmony is about hue, contrast is about lightness — a complementary pair can still fail AA, so check the badges and the dedicated contrast checker.
- Using all five palette colours at equal weight: five colours competing for attention reads as noise. Give one colour 60% of the screen and let the accent take 10%.
- Inventing a new hex for a hover state instead of using the next scale step: that is exactly what the 50–950 ladder is for, and it keeps the system consistent.
- Treating the scale as perceptually uniform: it is a lightness ladder, so the visual jump from 50 to 100 is smaller than from 900 to 950 — eyeball the steps before shipping.
- Shipping a palette checked only as swatches: test it as a heading, a paragraph, a button, and a border together, at real sizes, on a real screen.
- Using colour alone to carry meaning (red = error, green = success, with no icon or label): colour-blind users may not see the distinction at all, whatever the palette.
Limitations
Harmony is mathematics, not taste: a palette built from fixed hue offsets can still look bad in a real interface, and this tool cannot tell you whether it looks good — only whether it is harmonious and what its contrast ratios are. The 50–950 scale is a simple lightness ladder (hue and saturation fixed, lightness interpolated), not a perceptually uniform OKLCH scale, so steps near the ends can look uneven. Random and shuffled palettes carry no contrast guarantee — a shuffled swatch can fail AA against both white and black. Colour blindness is not simulated on this page: a palette that looks distinct to you may collapse for a colour-blind user, so check it in a simulator (such as Coblis or Color Oracle) before relying on colour alone to carry meaning. Image extraction is approximate: pixels are bucketed in steps of 32, so near-identical shades merge and the extracted colours are a starting base, not an exact sample. Export is CSS variables, a Tailwind config snippet, and JSON only — there is no ASE or .aco swatch-file export.
Structured Input/Output Example
#6366f1 (indigo), harmony: complementary
Palette: #6366f1, #f2ef64, #b9baf9, #1417e6, #f9f8b9 Scale: 50 #e8e8fd · 100 #dedffc · 200 #c2c3fa · 300 #a1a3f7 · 400 #8082f4 · 500 #6366f1 · 600 #2c2fed · 700 #1013bc · 800 #0b0c7a · 900 #060746 · 950 #04052f
Related Tools
WCAG Contrast Checker
WCAG contrast checker: check any foreground/background pair for AA and AAA — normal, large text and non-text UI — with a live preview and a one-click fix.
Color Converter
Color converter: translate colors between HEX, RGB, HSL and OKLCH with a live preview swatch. Type a hex code or pick visually, then copy clean CSS.
CSS Gradient Generator
CSS gradient generator with linear, radial, conic and mesh/aurora gradients — live preview, presets, Tailwind output and PNG export. 100% offline.
HEX to RGB Converter
Hex to RGB converter: turn any hex color code into red, green, and blue channel values. Handles 3-digit, 6-digit, and 8-digit hex with alpha.
RGB to HEX Converter
RGB to hex converter: turn RGB channel values into compact hex codes like #3b82f6 in one step. Free, offline, private.