Online Tool Store Online Tool Store

Random Color Generator

Generate a batch of random colors with HEX and RGB values shown side by side, and copy any swatch to your clipboard with one click. Runs entirely in your browser.

🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.

Click any swatch to copy its HEX code.

How the random color generator works

  1. Set how many colors you want and press Generate.
  2. Each color picks a random red, green, and blue value between 0 and 255.
  3. Click any swatch to copy its HEX code, ready to paste into your design tool or CSS.

The method

Readable label color is chosen using the WCAG relative luminance formula, which weights green most heavily and blue least, matching how the human eye perceives brightness.

FAQ

How is each color generated?

Each swatch picks a random value from 0 to 255 for red, green, and blue independently, giving every one of the 16.7 million possible RGB colors an equal chance of appearing.

How do I copy a color code?

Click any swatch to copy its HEX code to your clipboard instantly - no separate copy button needed.

Why is the text on some swatches dark and others light?

The tool calculates each color's relative luminance and picks dark or light text automatically, so the HEX and RGB labels stay readable against every background.

Can I generate more than one batch?

Yes. Press "Generate new colors" as many times as you like, and adjust how many swatches appear at once.

How we compare

Feature Online Tool Store randomcolor.com Coolors.co
One-click HEX copy
Both HEX and RGB shown at once
No sign-up or account Limited free tier

For a quick batch of random colors with both HEX and RGB shown, Random Color Generator saves an extra click every time.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.