HohoTools

Random Color Generator

This free random color generator produces uniformly random hex colors right in your browser, using crypto.getRandomValues — the same cryptographically secure source browsers reserve for keys and tokens.

How to use

  1. Choose how many random colors you want, from 1 to 24.
  2. Optionally enable the brightness filters to exclude too-dark or too-bright colors.
  3. Click Generate and click any swatch to copy its hex code.

Frequently asked questions

Are the colors truly random and unbiased?

Each color comes from crypto.getRandomValues, the browser's cryptographically secure random source. The generator draws three independent bytes — one per RGB channel — and a byte is uniform over 0-255 by construction, so no modulo bias or scaling drift is possible and all 16,777,216 colors are exactly equally likely. It is the same uniformity guarantee you would get from a physical 3-channel lottery.

What do the brightness filters do?

They compute each candidate's WCAG relative luminance — the standard formula the contrast checker uses — and reject candidates below 0.15 as too dark or above 0.85 as too bright, keeping only colors inside [0.15, 0.85]. Pure random RGB lands surprisingly often in the near-black and near-white zones that are useless on real backgrounds; the filter trims those so a batch stays usable on both light and dark designs.

Why is the count limited to 24?

A single batch is meant to be scanned by eye, and past a few dozen swatches people stop telling colors apart. 1 to 24 keeps the grid legible at every viewport; if you need more, generate several batches — each click is an independent draw.

Can I reproduce the same palette later?

No, deliberately. The generator is seeded by the operating system's entropy source and keeps no state, so every batch is unique and nothing can be replayed. If you find a color you like, copy its hex code — that is the portable, permanent record.

Is anything uploaded or stored?

No. Generation happens locally in your browser the moment you click Generate. Nothing leaves your device, and the colors vanish when you close the page.

Related tools

About this tool

This free random color generator produces uniformly random hex colors right in your browser, using crypto.getRandomValues — the same cryptographically secure source browsers reserve for keys and tokens. Randomness here is not a cosmetic trick: each color is drawn as three independent bytes, one per RGB channel, so every one of the 16,777,216 possible colors is exactly equally likely, with no bias toward muddy greens or washed-out pastels that naive math.random() tricks often introduce. Choose how many colors you need, from 1 to 24, and they appear in a grid where a click copies any hex code. An optional brightness filter tunes the output for real design work: it computes each candidate's WCAG relative luminance — the same formula the contrast checker uses — and drops candidates below 0.15 (too dark to read on dark backgrounds) or above 0.85 (too washed out on light backgrounds), so a batch never comes back as a wall of near-black and near-white swatches. Uses range from palette brainstorming and placeholder art to seed colors for generative sketches and test fixtures for color-handling code. Everything runs locally: nothing is uploaded, stored or logged. Set a count and generate your batch below.