Color Palette Generator

Pick one color and a harmony rule. Get five colors with background, text, primary and accent roles, previewed on real UI.

Preview

  • Light mode contrast 7/7 pass
  • Dark mode contrast 7/7 pass

Export

/* My palette — colorset.net */
:root {
  --color-1: #D8EFFF;
  --color-2: #83BBFF;
  --color-3: #3D5AFE;
  --color-4: #502DC7;
  --color-5: #29044F;

  --color-bg: #D8EFFF;
  --color-surface: #E7F5FE;
  --color-border: #BDD7E9;
  --color-text: #261143;
  --color-muted: #6D657E;
  --color-primary: #3D5AFE;
  --color-on-primary: #FFFFFF;
  --color-accent: #758998;
  --color-on-accent: #261143;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #110C1C;
    --color-surface: #1C1627;
    --color-border: #30293F;
    --color-text: #D8EFFF;
    --color-muted: #748897;
    --color-primary: #3D5AFE;
    --color-on-primary: #FFFFFF;
    --color-accent: #7357A5;
    --color-on-accent: #FFFFFF;
  }
}

Roles & contrast

Light mode contrast

7/7 pass
PairRatioResult
Aa Text on background14.24AAA
Aa Text on surface15.19AAA
Aa Muted text on background4.64AA
Aa Label on primary5.13AA
Aa Label on accent4.65AA
Aa Primary on background4.33AA Large
Aa Accent on background3.06AA Large

Dark mode contrast

7/7 pass
PairRatioResult
Aa Text on background16.20AAA
Aa Text on surface14.84AAA
Aa Muted text on background5.22AA
Aa Label on primary5.13AA
Aa Label on accent5.78AA
Aa Primary on background3.74AA Large
Aa Accent on background3.33AA Large

Similar palettes

Finding palettes close to yours…

How the palette generator works

Start from a single base color. The generator places it in a five-step lightness range — one light color for backgrounds, one dark color for text and three in between — and picks hues around it with the harmony rule you choose: analogous, complementary, split complementary, triadic, tetradic or monochromatic. Colors are computed in OKLCH, so steps look evenly spaced to the eye instead of jumping in brightness.

Lock, edit and reorder

Press Space to generate new colors. Lock the ones you like and only the unlocked slots change. Edit any slot with the color picker, move colors up or down (or press Shift + arrow keys), and undo withCtrl/Cmd + Z. The adjust sliders shift lightness, saturation or hue of every unlocked color at once.

You can also drag the handle on the left of a slot to reorder it, or focus the handle and press ↑/↓. If you already have colors, paste a list of HEX values anywhere on the page or use the Paste colors button and the generator starts from them. Pick a tone — pastel, vivid, muted or dark — and newly generated colors stay inside that range.

Change the number of colors

A palette starts with five colors and can hold anywhere from three to eight. Add color keeps the colors you have and adds one that follows the harmony rule in the widest gap of the lightness range. Remove any color you do not need with the remove button on its slot. The link, saved palettes and exports all keep the same number of colors.

Roles and contrast

Five colors are not a design until you know which one is the background and which one is the text. Colorset assigns roles automatically and nudges lightness until body text reaches WCAG AAA contrast in both light and dark mode. You can choose the background, primary and accent colors yourself (a dark background switches the preview to dark) and see the result on a website, dashboard, mobile app, poster and component preview. A pass count for light and dark mode sits above the preview, and the contrast table in the Roles & contrast tab below shows every pair that matters and whether it passes.

Share and export

The address bar always holds your palette, so copying the link shares the exact colors and harmony. Export as CSS custom properties with a dark mode block, a Tailwind v4 @theme or v3 config, SCSS, JSON or a PNG image, or save the palette to your browser. Looking for inspiration first? Browse ready-made color palettes or start from a single color in the color picker.