Random Color Generator
Generate random hex colors in one click — cryptographically secure, nothing uploaded.
Generate random hex colors instantly
Click Generate to produce one or more cryptographically random hex colors. Use the batch size selector to generate up to 20 colors at once. Click any swatch to copy its hex value to your clipboard. Enable the lightness constraint to restrict the output to a specific HSL lightness range — useful when you need random colors that are neither too dark nor too light for a given context.
The random bytes come from the browser's crypto.getRandomValues API, which is cryptographically secure. Nothing is sent to a server. The saturation constraint helps avoid muddy near-gray colors when you want vivid results.
FAQ
Why use crypto.getRandomValues instead of Math.random? crypto.getRandomValues is cryptographically unpredictable, which means the output cannot be predicted from previous results. For colors it makes no practical difference in quality, but it is the correct tool for generating random data in the browser.
What do the lightness constraints mean? Lightness is the L channel in HSL (0 = black, 100 = white). Setting Min L to 20 and Max L to 80 ensures you get colors that are neither very dark nor very light.