UTILS.
Private by default
⚂

Random Color Generator

Generate a random color and view it as HEX, RGB and HSL.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
Click any value to copy it.

About this tool

Generate a cryptographically random color and copy it as HEX, RGB or HSL — generated locally in your browser with no network calls.

Each press of Generate draws three random bytes and uses them as the red, green and blue channels, so every combination of 256 levels per channel is equally likely. A new color is also generated when the page loads. There are no controls to limit hue, brightness or saturation, so results can be very dark, very light or dull.

The swatch is shown with three tiles. HEX is a lowercase six-digit code, RGB is written as rgb(r, g, b), and HSL gives the hue in whole degrees with saturation and lightness as whole percentages. Nothing is saved between presses, so copy a value before you generate the next color.

Frequently asked questions

Is the color truly random?
It uses the browser's cryptographic random number generator (crypto.getRandomValues) for the RGB channels.
How do I copy a value?
Click any of the HEX, RGB or HSL tiles to copy that value.
Can I get the previous color back?
No. The page keeps no history, and each press of Generate replaces the swatch and all three values. Copy the value you want before generating again.
Why might the HSL value not convert back exactly?
Hue, saturation and lightness are rounded to whole numbers for display, so converting the HSL value back can differ slightly from the HEX shown. The HEX and RGB values are exact.

More tools