Color Palette Generator
Press the space bar for a new color scheme or start from a photo. Lock the colors you love, see them on a page, then export a palette that passes contrast checks.
Press Space or Generate for a new palette. Lock the colors you like and they stay.
Tap a color to edit it, its code to copy it, the padlock to keep it. Drag the dotted handle to reorder.
A base color (HEX, rgb(), hsl() or a name) becomes color 1, locked, with the rest built around it. Press Enter after typing.
Auto: a different harmony each time you generate. Pick one to steer the results.
Color 1 of 5
The sliders work in OKLCH, so lightness steps look even across hues. A color outside what screens can show is brought back by lowering its chroma.
Shades 50–950 of this color (tap to use one)
Preview on a page
- Background
#f2e3bcfills most of the page - Text
#16324f10.28:1 on the background, AAA - Buttons
#c8553d#000000 labels, 4.82:1, AA - Accent
#f29e4c1.68:1 on the background: use it for fills, it's too faint for text or icons
The lightest color becomes the background (the darkest on a dark page), the one with the most contrast carries the text, and the most colorful ones fill buttons and accents, roughly a 60-30-10 split. Shuffle roles tries the other colors.
Contrast checker (WCAG 2.2)
Rows are backgrounds, columns are text colors. AAA: 7:1 or more · AA: 4.5:1 · AA large: 3:1, for text from 24 px (or 18.7 px bold) and for icons and borders.
Color blindness check
Simulated with the Machado, Oliveira and Fernandes (2009) model. Curious about your own color vision? Take the color blindness test.
Export
An Adobe Swatch Exchange (.ase) file with one named swatch per color. In the Swatches panel menu choose Import Swatches (Photoshop), Open Swatch Library › Other Library (Illustrator) or Load Swatches (InDesign).
Import colors
Saved palettes
Press Save to keep the palette on screen here. Saved palettes stay on this device.
Why use a color palette generator?
Choosing colors that work together is slow by trial and error. A generator suggests whole palettes in a keystroke, built on color-wheel harmonies, so you can react to options instead of starting from a blank picker. Lock the colors you already like and the rest are rebuilt around them. This one also checks what most generators leave to you: whether text in these colors is readable, and whether people with color blindness can tell them apart.
How to generate a color palette
- Press Space (or Generate on a phone) until a palette catches your eye, or start from a photo with From image.
- Lock the colors you want to keep with their padlock, then keep generating: only unlocked colors change.
- Steer it: choose a Harmony, type a Base color, or fine-tune any color with its sliders and shades.
- See it in Preview on a page, check the contrast and color blindness panels, then export as CSS, Tailwind, JSON, Adobe or PNG, or copy the link.
Color harmonies, explained with one color
A harmony is a rule for picking hues by their angle on the color wheel. Here is each one applied to the same teal, #2a7f8f, keeping its lightness and chroma, so you can compare them directly. In the generator the extra colors also get lighter and darker versions, which is what makes a usable palette.
| Harmony | Hues | Example | Character |
|---|---|---|---|
| Analogous | neighbors 20–35° apart | #2a7f8f#44789f#2d8277#626fa3 | Calm and natural, like a sunset or a forest. Easy to get right. |
| Monochromatic | one hue | #bce1e9#69b0bf#2a7f8f#125561 | Quiet and cohesive. Needs lightness contrast to stay readable. |
| Complementary | 0° and 180° | #2a7f8f#9d6053 | High energy and strong contrast. Use one color as an accent. |
| Split complementary | 0°, 150° and 210° | #2a7f8f#9b5d6e#95673d | Contrast with less tension than a direct opposite. |
| Triadic | 0°, 120° and 240° | #2a7f8f#8f6088#837135 | Lively and balanced. Let one color lead and mute the others. |
| Tetradic (rectangle) | 0°, 60°, 180° and 240° | #2a7f8f#626fa3#9d6053#837135 | Rich and varied. Works best with one dominant color. |
| Square | 0°, 90°, 180° and 270° | #2a7f8f#7c679b#9d6053#6a7a42 | Bold and playful, four equally spaced hues. |
One color wheel or three? Why red's complement varies
Ask three people for the complementary color of red and you may hear cyan, green and teal, and all three are right for their wheel. Screens mix light, so the RGB wheel behind CSS's hsl() puts cyan opposite red. Painters mix pigments on the red-yellow-blue (RYB) wheel, where red faces green. The perceptual OKLCH wheel spaces hues by how different they look, and its opposite of red is #009aac. Pick the wheel in the generator:
| Color | RGB / HSL | RYB (painter's) | OKLCH (perceptual) |
|---|---|---|---|
| Red | #00ffff | #00ff00 | #009aac |
| Yellow | #0000ff | #ff00ff | #f4f3ff |
| Blue | #ffff00 | #ff8000 | #6e5000 |
Perceptual is the default because harmonies built on it come out balanced: on the RGB wheel a yellow and a blue at the same lightness look nothing alike, while OKLCH keeps them equally bright. RYB is the choice for illustration and print, where the art-school pairs (red and green, blue and orange, yellow and purple) are expected.
Make a palette from a photo
A photo you like is a quick route to colors that already belong together. Press From image, or drop or paste a picture anywhere on the generator, and its dominant colors become the palette, the largest areas first. It takes as many colors as the palette has, so set the count with + and − before you open the image. The picture is read in your browser and never uploaded.
The colors come from the same method as the image color picker: the image is sampled down to at most 200 pixels a side, similar pixels are grouped with k-means clustering in the OKLab color space, and each swatch is the average of the real pixels in its group. Then make it yours: lock the photo colors you want and press Space, and the free slots are rebuilt as a harmony around the first locked color. Two tips: crop to the part of the picture you care about, because a plain sky or wall takes a slot of its own, and use the image color picker when you need one exact pixel, such as a logo's brand color.
How many colors? The 60-30-10 rule and palette roles
Most websites, apps and brands get by with three to five colors: a background, a text color, a main color for buttons and links, and an accent, sometimes with a second neutral. The 60-30-10 rule from interior design is a sound starting split: about 60% of the screen in the dominant color (usually the background), 30% in a secondary color (text, panels, navigation) and 10% in the accent that should draw the eye, such as the main button.
Preview on a page puts that into practice. It gives the lightest color the background, the color with the most contrast against it the text, and the most colorful ones the buttons and the accent, then paints a small page with a navigation bar, headline, buttons, cards and a chart. Dark makes the darkest color the background, Shuffle roles tries the other colors on the buttons, and the legend gives each role's contrast ratio. Charts, maps and dashboards are the exception to "fewer is better": every data series needs its own color, which is why the generator goes up to 10.
Build a website palette that passes WCAG contrast
A palette for a website or app needs more than pretty colors: text has to stay readable. Plan for a near-white and a near-black for backgrounds and body text, then check every pair you will actually put together. The Web Content Accessibility Guidelines (WCAG 2.2) ask for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text and for icons and input borders; 7:1 meets the stricter AAA level.
The contrast grid under the palette does this for every combination at once. In the starting palette, the dark navy on the cream reaches 10.28:1, comfortable for body text, while the orange on the cream gets only 1.68:1, which fails even for large text: it can fill a button with dark text, but not be text on that background. Every swatch's own label is set in whichever of black or white reads better, so you can see which colors carry light or dark text. To fix a single failing pair, open the color in the color converter, whose contrast checker suggests the nearest shade that passes.
Make palettes color-blind friendly
About 1 in 12 men and 1 in 200 women have some form of color vision deficiency, according to the charity Colour Blind Awareness, most often a weakness of red or green cones. The color blindness check shows the palette as it appears with protanopia, deuteranopia, tritanopia and achromatopsia (no color at all), and lists the colors that become hard to tell apart. The usual cure is lightness: two colors that differ clearly in lightness stay distinct for almost everyone, while a red and a green of the same lightness can merge. For charts, also use labels, patterns or position rather than color alone. To learn how your own eyes see color, try the color blindness test.
Export to CSS, Tailwind, Figma and Adobe apps
Choose a format under Export, preview the code and copy or download it. Variable names describe each color ("deep teal", "light amber"), or switch to numbered names. The starting palette as CSS custom properties:
:root {
--color-deep-slate: #16324f;
--color-teal: #2a7f8f;
--color-beige: #f2e3bc;
--color-orange: #f29e4c;
--color-red: #c8553d;
}
- CSS and SCSS: paste into your stylesheet and use
var(--color-…)or the$color-…variables. Values can be HEX, rgb(), hsl() or oklch(). - Tailwind CSS: v4 reads colors from an
@themeblock in your CSS, so--color-deep-tealbecomesbg-deep-tealandtext-deep-teal; v3 takes thetailwind.config.jssnippet. - JSON: every color with its HEX, RGB, HSL and OKLCH values, for design tokens and scripts.
- Figma, Canva and Sketch: paste the HEX codes, or drop the SVG of the swatches onto the canvas.
- Adobe Photoshop, Illustrator and InDesign: import the .ase swatch file from the Swatches panel menu. GIMP, Inkscape and Krita read the .gpl palette.
- PNG: a 1200 × 630 image of the palette with its codes, ready to send or post.
Shades from 50 to 950
Design systems rarely use a color at one strength: they need a pale tint for backgrounds, the color itself for buttons and dark shades for hover states and text. Tick Add 50–950 shades and each color is exported as an 11-step scale, named the way Tailwind CSS names its own, from 50 (palest) to 950 (darkest). The steps follow a lightness curve modeled on Tailwind's own scales, with small steps between the pale tints that backgrounds use, all at the color's own OKLCH hue and with the chroma tapering off toward white and black. The color itself takes the step nearest to its lightness, unchanged. For the teal above, the scale runs:
50: #f0f9fb100: #dceff4200: #bce1e9300: #94ccd8400: #69b0bf500: #4395a5600: #2a7f8f700: #196977800: #125561900: #13464f950: #082c32
Tips and common mistakes
- Too many saturated colors. Five vivid hues compete with each other. Keep one or two strong colors and let the rest be muted or neutral.
- No neutrals. Most screens are mostly background and text. Lock a near-white and a near-black, or a warm or cool gray, and generate the accents around them.
- Judging colors in isolation. Colors change next to each other. Look at them together in the page preview, reorder the swatches by dragging, and check the pairs you will really use in the contrast grid.
- Relying on hue alone. If two colors must be told apart (error and success, chart series), make their lightness differ too.
- Losing a palette you liked. Undo brings it back, Save keeps it on this device, and the link in the address bar always reproduces the palette on screen.
Need one exact color from a logo or screenshot? The image color picker reads any pixel and sends what you pick here. To turn any single color into HEX, RGB, HSL, HSV, CMYK or OKLCH, use the color converter; and if a palette is for a QR code, check it scans in the QR code generator.
Frequently asked questions
How do I generate a color palette?
Press the space bar, or the Generate button on a phone, for a new palette. When you like a color, click its padlock to lock it: locked colors stay put and the next palettes are built around them. Choose a harmony such as analogous or triadic to steer the results, or leave it on Auto for a different harmony each time. Undo (Ctrl+Z or Command+Z) brings back the previous palette.
How do I make a color palette from one color?
Enter it as the Base color, as a HEX code, rgb(), hsl() or a CSS color name, or use the color picker. It becomes color 1, locked, and the other colors are built around it with the harmony you chose. Press Space for more variations; the base color stays. You can also lock any color already in the palette and generate around it.
What are complementary, analogous, triadic and tetradic colors?
They are positions on the color wheel. Complementary colors sit opposite each other (180° apart) and give the strongest contrast. Analogous colors are neighbors about 20° to 35° apart and look calm. Triadic colors are three hues 120° apart; split-complementary pairs a color with the two hues next to its opposite (150° and 210°); tetradic uses two complementary pairs (a rectangle at 0°, 60°, 180° and 240°) and square spaces four hues 90° apart. Monochromatic palettes keep one hue and vary its lightness and saturation.
What is the complementary color of red?
It depends on the color wheel. On the RGB wheel used by screens and the HSL hue in CSS, red's opposite is cyan (#00ffff). On the traditional painter's red-yellow-blue wheel taught in art class, it is green (#00ff00). On the perceptual OKLCH wheel it is a teal blue (#009aac). The generator can use any of the three: perceptual is the default because its palettes come out balanced, and RYB suits illustration and print.
How do I create a color palette from a photo?
Press From image and choose a photo, or drop or paste one onto the generator. Its dominant colors, found by grouping similar pixels (k-means clustering in the OKLab color space), become the palette, the largest areas first, with as many colors as the palette has. The photo is read in your browser and never uploaded. Lock the colors you want to keep and press Space to build new ones around them.
How do I choose a color palette for my website or brand?
Start from one color that already means something, such as a logo color or one taken from a photo, enter it as the base color and generate around it. Keep to three to five colors: a light and a dark neutral for the background and text, a main color for buttons and links, and one accent. Then look at it in Preview on a page, check that text and button labels reach 4.5:1 in the contrast grid, and try the color blindness views before you export.
How many colors should a palette have?
Most websites and brands work well with three to five: one or two neutrals for backgrounds and text, a main color and one accent. A common guideline is 60-30-10: about 60% of a design in a dominant color, 30% in a secondary one and 10% in an accent. Charts and maps need more colors that stay distinct, which is where the color blindness check helps. The generator makes palettes of 2 to 10 colors.
How do I check that my palette's colors are accessible?
Use the contrast grid under the palette: it shows the WCAG contrast ratio of every text color on every background, and the page preview rates the text and button colors it picks. WCAG 2.2 level AA asks for at least 4.5:1 for normal text and 3:1 for large text (24 px, or about 18.7 px bold) and for icons and input borders; level AAA asks for 7:1. Each swatch's own label is set in black or white, whichever reads better on it.
Is my palette color-blind friendly?
The color blindness check simulates protanopia, deuteranopia, tritanopia and achromatopsia with the Machado (2009) model and names any colors that become hard to tell apart. Color vision deficiency affects about 1 in 12 men and 1 in 200 women, according to Colour Blind Awareness, so don't rely on hue alone: make colors that must be told apart differ in lightness too, and add labels or patterns in charts.
Can I export a palette to Tailwind CSS, Figma or Adobe apps?
Yes. Export gives CSS custom properties, SCSS variables, a Tailwind CSS v4 @theme block or a v3 config (optionally with 50 to 950 shades of every color), JSON, an SVG of the swatches, a .gpl palette for GIMP, Inkscape and Krita, an Adobe Swatch Exchange (.ase) file for Photoshop, Illustrator and InDesign, and a PNG image. For Figma, paste the HEX codes or drop the SVG onto the canvas.
How do I save or share a palette?
The address bar always holds a link to the palette on screen, with the colors after the # sign (for example #264653-2a9d8f-e9c46a), and Share link copies it or opens your phone's share sheet. Save keeps the palette in a list on this device, so you can reopen it later. Everything runs in your browser: your palettes and settings stay in its local storage, and nothing is uploaded to a server.
Can I use the palettes for commercial work?
Yes. Palettes you make here are free to use in any personal or commercial project, with no sign-up or credit needed. Note that a few companies have trademarked a specific color for their kind of product, so avoid copying a competitor's exact brand color for something similar.
Related tools
More free, private, browser-based utilities — no upload, no sign-up.