Random Color Generator
Generate a batch of random colours as swatches with hex codes, with pastel, vivid, dark and hue-locked modes.
This guide is not yet available in your language and is shown in English.
Tool guide
What this tool does
Random Color Generator creates any number of random colours at once and shows each one as a swatch with its hex code ready to copy. Colours are built in the OKLCH colour space rather than plain RGB, so lightness and chroma stay perceptually even across a batch instead of clustering around muddy mid-tones. Lock the hue to a slice of the colour wheel, or restrict the whole batch to pastel, vivid or dark tones, to get palettes that already look intentional.
Designers, developers and anyone sketching a UI often need a handful of colours that are different from each other without being jarring. Picking them one at a time in a colour wheel is slow, and a plain RGB random generator tends to produce washed-out or overly dark results because it treats red, green and blue as equally important to how bright a colour looks. This tool instead samples in OKLCH, a colour space built around how humans actually perceive lightness, so a "light" setting genuinely looks light across every hue.
Every generated colour comes with its hex code and a one-click copy button, and the tone presets (pastel, vivid, dark) and hue lock give you just enough control to steer the output toward a specific mood without hand-picking every value.
How to use Random Color Generator
- Set how many colours you want in the batch, from a single swatch up to 500.
- Pick a tone: Any for a broad spread, Pastel for soft light colours, Vivid for saturated colours, or Dark for deep, low-light colours.
- Optionally turn on "Lock hue range" and set a from/to angle on the 0-360 colour wheel to stay within a family, such as blues and teals.
- Turn on "Avoid near-duplicates" if you want every swatch to look clearly distinct from the others.
- Press Generate to produce the batch, then click any swatch's copy button to grab its hex code, or copy the whole list at once.
Tips for better results
- Narrow hue locking to a 30-60° range when you need a monochromatic-feeling set rather than a rainbow.
- Pastel and Dark presets are good starting points for backgrounds, while Vivid works well for accents, tags and charts.
- Turning on "Avoid near-duplicates" is worth it once your batch size gets past about 10, since random sampling alone can place two colours very close together by chance.
- If you need the exact RGB, HSL or OKLCH numbers rather than just hex, open the Color Converter tool with a swatch's hex code pasted in.
Common use cases
- Generating a quick set of placeholder brand or tag colours while prototyping a design.
- Building categorical colour scales for charts where each series needs a visually distinct colour.
- Picking a cohesive accent palette by locking the hue range to a theme colour's neighbourhood.
- Creating randomized test fixtures for a design system or colour-picker component.
Common mistakes to avoid
- Using a plain RGB random generator and ending up with mostly dull, brownish colours; sampling in OKLCH avoids this by keeping lightness and chroma controlled independently of hue.
- Forgetting that two randomly sampled colours can be nearly identical to the eye even with different hex codes; enable "Avoid near-duplicates" rather than eyeballing a large batch.
- Expecting a wide hue lock range (like 0-360) to behave differently from "Any"; a full-circle range is the same as no lock at all.
- Assuming the hex codes alone meet accessibility needs; always check contrast separately with a tool like Contrast Checker before using a colour for text.
Frequently asked questions
How is this different from a plain random RGB generator?
Colours are sampled in the OKLCH colour space, where lightness and chroma are perceptually even across every hue. A plain RGB random pick tends to bias toward dull, mid-brightness colours; OKLCH sampling lets the Pastel, Vivid and Dark presets each produce consistently light, saturated or deep colours regardless of hue.
Can I generate colours within a specific hue range, like just blues?
Yes. Turn on "Lock hue range" and set the from/to values in degrees on the 0-360 hue wheel; 180-240 covers cyans and blues, for example. The range wraps correctly even if the "to" value is smaller than "from".
Will two colours in the same batch ever look identical?
With "Avoid near-duplicates" off, it is possible for two swatches to land close together by chance, just as with any random sampling. Turning that option on rejects candidates that are perceptually very close (measured with the CIEDE2000 colour-difference formula) to a colour already in the batch.
Does this tool send my colours anywhere?
No. Every colour is generated and rendered entirely in your browser; nothing is uploaded to a server.
Can I get RGB or HSL values instead of hex?
This tool focuses on hex codes for quick copying, but you can paste any generated hex into the Color Converter tool to see RGB, HSL, HSV, OKLCH and other formats for that exact colour.
Feedback & suggestions
Help us improve Random Color Generator. We read every message.