Random Color Palette Generator

Press spacebar or click Generate and get a new color palette every time. Lock any color you want to keep, then keep generating until the rest of the palette clicks. Export your result as hex codes, CSS variables, Tailwind config, or a PNG — free, instant, no account needed.

Why Random Color Generation Works Better Than You'd Expect

A purely random selection of colors — each generated independently — produces muddy, clashing combinations more often than not. The colors in this generator aren't randomly sampled from the full color space. They use the golden angle (137.5 degrees) to distribute hues around the color wheel, which ensures each generated swatch is perceptually distant from its neighbors. The saturation and lightness ranges are also constrained to a range that produces colors with practical utility — vivid enough to read, varied enough to be interesting, but not so extreme they become impossible to use in real design work.

The Lock System: Keeping What Works

The most useful feature in any random generator is the ability to save partial results while continuing to iterate on the rest. Hover over any swatch and click the lock icon in its top-right corner to lock it in place. Locked swatches won't change when you hit Generate — so if you find a deep teal you love, lock it and keep generating until the palette around it feels right.

This workflow — generate broadly, lock selectively, iterate on the remainder — is faster than trying to find a complete palette in a single generation. Most designers and developers who use random generators find their best results this way: one or two anchors they love, then rapid iteration on the rest until the combination clicks. Spacebar makes the iteration step instant, so you can move through dozens of options in under a minute.

Switching to a Harmony Mode

The dropdown next to the color count lets you switch from Random to a structured harmony mode at any point. If you find a direction in Random that feels right but want to explore a more controlled variation, switch to Analogous for a cohesive range, Complementary for high contrast, or Monochromatic to strip out hue variation entirely. The locked colors are preserved when you switch modes, so you can use Random to discover a hue you like, lock it, then switch to a harmony mode to build a structured palette around that starting point.

Exporting and Using Your Palette

Once you have a palette you're happy with, the action bar below the swatches gives you four export options. Copy All Hex outputs the hex codes as a comma-separated list — the simplest format for dropping colors into any tool. Copy CSS Vars produces a :root block with custom properties numbered from 1 upward, ready to paste into a stylesheet. Copy Tailwind generates a colors object you can merge directly into your Tailwind configuration. Export PNG creates a palette card with each color as a labeled swatch, which you can import into Figma or Sketch as a reference, attach to a brief, or save in a project folder.

The PNG export uses a dark background to show each color accurately without the surrounding environment influencing how you perceive it — the same reason paint stores display swatches on neutral cards rather than colorful ones.

Related Color Tools

Frequently Asked Questions

Are the generated palettes truly random?

The hue starting point is random, but the distribution of hues across the palette uses the golden angle (137.5°) to ensure perceptual separation between colors. Saturation and lightness values are randomly sampled within constrained ranges that produce usable, realistic colors rather than neon extremes or muddy near-grays. The result is random in the sense that each generation produces a different output, but structured enough to consistently produce palettes with visual coherence.

How do I save a palette I like?

Use one of the export buttons below the swatches. Copy All Hex gives you the codes as text you can paste anywhere. Export PNG creates a palette card image you can save to your device. For ongoing projects, copying the CSS Variables or Tailwind output into your project files is the most durable format — you'll always have the colors in a format your tools can use directly.

Can I use these palettes in commercial projects?

Yes. Colors are not copyrightable, and there are no restrictions on using palettes generated here in any project — commercial or personal, client work or internal tools. The hex codes are simply mathematical descriptions of colors; you own whatever you create with them.

What is the fastest workflow for finding a good palette?

Set your desired color count, then press spacebar rapidly to cycle through palettes. When something partially clicks — even a single color you like — stop and lock that swatch. Then continue pressing spacebar to iterate on the rest. Repeat for any second color you want to preserve, then keep going until the unlocked positions fill in with colors that feel right alongside the locked ones. Most people find a palette they're happy with in under two minutes using this approach.

What does the color count affect?

The count determines how many swatches are generated and how many hex codes appear in any export. For most UI design systems, three to five colors is the practical range — primary, secondary, accent, neutral, and one more for states or decorative use. For illustration, branding with complex palettes, or data visualization, six to eight may be more useful. The golden angle distribution ensures even spacing regardless of how many colors you choose.

Start Generating

Press spacebar, lock what you love, and keep going — find your palette in seconds.

Generate a Random Palette