colorcodekit

Palette generator

Press the space bar for a new palette of 3 to 10 colors. Lock the ones you like, build from a base color or a photo, or switch to accessible mode so every text and background pair passes WCAG AA.

First color#00FF49
Text on it—
WCAG—
Mode
5
Export palette →

Press the space bar for a new palette. Lock a color to keep it. The page address always holds the palette, so you can bookmark or share it.

Contrast between the colors

Every color against every other, with WCAG 2.2 grades. Select a cell to open the pair in the contrast checker.

How it looks with color blindness

The same palette as seen with three types of color blindness and with no color vision. If two colors merge in a row, they will be hard to tell apart for some people.

Simulated with the Machado matrices used on the color blindness simulator.

How the palette generator works

The generator picks colors in OKLCH, a color space where equal changes in lightness and chroma look like equal changes to the eye. Random mode spreads hues around the circle and draws lightness and chroma from a balanced range. Harmony mode starts at your base color and walks the hue angles of the scheme you choose. From image mode clusters a picture's pixels in OKLab and returns the cluster centers. Accessible mode builds two groups, text colors and backgrounds, and nudges lightness until every pair passes.

Lock a color and keep going

Select Lock under a swatch and it stays put while the rest change. That is the quickest way to build around one color you already like. Locks are off in accessible mode, because a locked color could break the contrast guarantee.

Palette sizes

Palettes run from 3 to 10 colors. Changing the count keeps the colors you already have and adds or drops from the end, except in accessible and image modes, which rebuild the set.

Keyboard use

Press the space bar anywhere on the page, outside a text field or a button, to generate a new palette. Tab moves between the controls and the swatches. Each swatch has a button that copies its code and a button that locks it.

Frequently asked questions

How do I make a color palette from one color?

Choose Harmony, type your base color and pick a scheme such as analogous, complementary or triadic. The first swatch is your color and the rest follow the scheme's hue angles, stepped in lightness. The color wheel shows the angles for each scheme.

What does accessible mode guarantee?

Half the colors are dark text colors and half are light backgrounds. Every dark color on every light color has a contrast ratio of at least 4.5:1, the WCAG 2.2 level AA minimum for normal text. The grid under the palette outlines those pairs. Two dark colors, or two light colors, are not meant to be used together, so they are not checked.

Can I make a palette from a photo?

Yes. Choose From image and pick or drop a picture. The page groups the picture's pixels into as many clusters as you asked for colors and returns the center of each, most common first. The image is processed in your browser and is never uploaded.

How do I save or share a palette?

The page address updates with every change and holds the colors, the mode and which colors are locked. Bookmark it or use Copy link. Export palette opens the colors in the exporter for CSS, Tailwind, SCSS, JSON, Figma and mobile code.

How do I generate a random color?

Set the number of colors to 3, leave the mode on Random and press the space bar. Copy any color by clicking its code. The generator picks colors in OKLCH, so random results stay balanced in lightness instead of drifting toward very dark or very bright.

Content updated