Skip to content

Color Palette Generator

AI-powered

Type a vibe such as 'desert at dusk' or 'cyberpunk lab' and get a 5-color palette with hex, RGB, HSL and OKLCH for every swatch.

Starter palette

Colour format
highlight
accent
primary
background
secondary

Contrast between swatches (WCAG 2)

Each cell is one swatch as text on another as background. AA needs 4.5:1 for body text and 3:1 for large text and UI parts; AAA needs 7:1.

Text ↓ on →Background 1 (highlight)Background 2 (accent)Background 3 (primary)Background 4 (background)Background 5 (secondary)
1same colour
1.2
Fail
4.0
AA large
6.2
AA
2.4
Fail
2
1.2
Fail
same colour
3.1
AA large
4.8
AA
1.8
Fail
3
4.0
AA large
3.1
AA large
same colour
1.5
Fail
1.6
Fail
4
6.2
AA
4.8
AA
1.5
Fail
same colour
2.5
Fail
5
2.4
Fail
1.8
Fail
1.6
Fail
2.5
Fail
same colour

01 · Definition

What is a color palette?

A color palette is a small, fixed set of colors used together across a design, typically a background, a surface, a text color and one or two accents. This generator turns a text description into five colors and gives each one as hex, RGB, HSL and OKLCH, so the values can go straight into CSS.

02 · Overview

How the Color Palette Generator works

Generate a five-color palette from a natural-language vibe. Each swatch copies with one click as hex, RGB, HSL or OKLCH. Change any swatch with the color picker or by typing a hex value, check the WCAG contrast ratio between every pair in the table, and export the set as CSS variables or a Tailwind theme. An AI model (Claude) proposes the colors; conversions and contrast are computed in your browser.

03 · Guide

WCAG contrast levels: AA, AAA and AA large

The contrast table under the swatches gives the WCAG 2 contrast ratio for every pair of colors, from 1:1 for identical colors to 21:1 for black on white, with one of four labels. The thresholds come from WCAG success criteria 1.4.3, 1.4.6 and 1.4.11.

Large text means at least 18 point, or 14 point bold, which WCAG puts at roughly 24px and 18.5px. Ratios are compared without rounding, so 4.49:1 does not pass 4.5:1.

LabelContrast ratioEnough for
AAA7:1 or higherBody text at the enhanced level (1.4.6)
AA4.5:1 up to 7:1Body text at the minimum level (1.4.3); large text at AAA
AA large3:1 up to 4.5:1Large text at AA; UI components and graphics (1.4.11)
FailBelow 3:1Decoration only
Labels used in the palette contrast table

04 · Guide

Exporting a palette to CSS and Tailwind

Export writes the five colors in four forms. The CSS variables and the Tailwind v4 block use whichever format is selected (hex, RGB, HSL or OKLCH); the Tailwind v3 config and the plain list are always hex.

ExportWhat it contains
CSS variablesA :root block with --color-1 to --color-5
Tailwind v4 @themeAn @theme block with --color-palette-1 to --color-palette-5
Tailwind v3 configtheme.extend.colors.palette with keys 1 to 5, in hex
Hex listThe five hex values separated by commas
Export formats

05 · Use cases

When to use the Color Palette Generator

  1. 01

    Kick off a brand exploration without opening a design tool

  2. 02

    Get a palette for a landing page before a designer is involved

  3. 03

    Translate a mood board prompt into usable CSS variables

  4. 04

    Generate quick swatches for a data viz or chart series

06 · Examples

Color Palette Generator examples

sunset over Tokyo

ex 01

#ff9472, #f2709c, #5b3a8c, #1d2671, #c33764

A warm-to-cool gradient palette inspired by city dusk.

minimal forest morning

ex 02

#e8efe6, #b7c9b1, #8aa78a, #4f6b56, #243d33

Soft greens stepping from highlight to deep shadow.

cyberpunk diner

ex 03

#0d0221, #ff003c, #00f0ff, #ffd700, #f6019d

High-contrast neons over near-black backgrounds.

brutalist zine, high contrast

ex 04

#f4f1de, #e07a5f, #3d405b, #81b29a, #f2cc8f

Warm paper base with a terracotta accent and a deep navy for text.

07 · FAQ

Palette: frequently asked questions

How does it pick the colors?

Claude proposes five hex values from your description. The tool then converts each to RGB, HSL, and OKLCH locally and previews them as swatches.

Can I edit a single swatch?

Yes. Each swatch has a color picker, a hex field that accepts #rgb or #rrggbb, and a randomize button. The displayed value, the contrast table and the exports update as you change it. Values are shown in hex, RGB, HSL or OKLCH, but typed input is hex only.

Why OKLCH and not just HSL?

OKLCH is designed to be close to perceptually uniform: equal steps in lightness look roughly equal to the eye. HSL doesn't have that property and can produce muddy mid-tones. Both are exported for compatibility.

Are the palettes accessible?

Not automatically. The contrast table under the swatches shows the WCAG 2 ratio for every pair, labelled AAA (7:1), AA (4.5:1), AA large (3:1) or Fail, so you can see which swatches work as text on which backgrounds. Adjust a swatch and the ratios update.

How do I turn a palette into CSS variables?

Open Export. It gives a :root block of CSS variables and a Tailwind v4 @theme block in the format you have selected, plus a Tailwind v3 config and a comma-separated list in hex. OKLCH suits a theme scale: lightness is close to perceptually uniform, so you can derive hover and disabled states by shifting the L channel without the hue drift you get in HSL.

How many colors should a palette have?

Five is enough for most interfaces: a background, a raised surface, a body text color, an accent, and one supporting tone. Semantic colors for success, warning, and error sit outside the palette because they carry fixed meaning rather than brand, and users expect them to look roughly the same everywhere.

What happens to the description I type?

The description you type is sent to our server, which passes it to the Anthropic API to produce the result. We keep per-IP rate-limit counters: 10 AI generations per hour and 50 per day, shared across the AI tools. Like every page on the site, this one loads page analytics (Vercel Analytics, Speed Insights and aside.so). Editing swatches, format conversion, the contrast table and the exports run in your browser. Palette results are not cached.

08 · Guides

Palette guides

09 · Reference

Specs and further reading

These are the primary sources this tool follows. Where a specification defines the behaviour, we link the specification, not a summary of it.

10 · More

Tools that pair with Palette

Last updated .