Generator Tools
Random Color Generator
Generate random hex, RGB, HSL, and OKLCH colors in your browser. Pick a mood, lock favorites, and export the batch as CSS variables or JSON.
Random color generator
Generate
Full random across the entire sRGB cube. Tip: press the space bar to regenerate.
Every color is sampled fresh in your browser using cryptographic random bytes. Nothing is uploaded.
How to use
- Choose a mood preset (Any, Pastel, Vivid, Dark, Light, Warm, Cool, Earthy, or Neon) to shape where the random sampling happens.
- Pick a batch size from 1 to 20 colors and press Generate, or just press the space bar.
- Click Lock on any swatch you want to keep across the next regeneration, then press Generate again to reroll only the unlocked positions.
- Copy individual values (hex, RGB, HSL, OKLCH) from each card, or use the export panel to grab the whole batch as plain text, CSS variables, or JSON.
- Use the history panel at the bottom to restore an earlier batch you generated.
About this tool
Random Color Generator rolls fresh random colors on demand and renders each one in four standard notations at once: hex (#aabbcc), CSS rgb(), CSS hsl(), and CSS Color 4 oklch(). Pick a batch size from one swatch up to twenty and choose a mood preset that constrains where the random sampling happens in color space: Any draws uniformly from the full sRGB cube, Pastel stays in low-saturation high-lightness territory, Vivid clamps to high saturation and balanced lightness, Dark and Light bias toward the extremes, Warm and Cool restrict hue to the red-orange-yellow or blue-green-purple arcs, Earthy produces muted clay and ochre tones, and Neon pushes near-maximum saturation. Every swatch shows its WCAG 2.x contrast ratio against both white and black backgrounds with an AA, AAA, or fail badge so you can immediately see which foreground text color a button or label needs. Lock any swatch to hold it across regenerations, then click Generate to roll only the unlocked positions: this is the standard pattern designers use to refine a palette one slot at a time. The current batch can be exported as plain text, a :root block of CSS custom properties, or a JSON array, and the last six batches are kept in a history panel so you can roll back to a palette you liked. Randomness comes from crypto.getRandomValues, the same browser API used for cryptographic random bytes, so the output is unbiased across runs. Press the space bar anywhere on the page to regenerate without reaching for the mouse. Everything runs locally; no colors leave your browser.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Color Palette Generator
Build complementary, analogous, triadic, and monochromatic color schemes from any HEX.
Open tool
GeneratorColor Shades and Tints Generator
Build a 50 to 900 style ramp of shades and tints from a single hex color.
Open tool
GeneratorColor Mixer
Blend two colors with OKLCH, LAB, HSL, or sRGB and copy the steps.
Open tool
GeneratorColor Harmony Generator
Build complementary, triadic, tetradic, analogous, and monochromatic palettes.
Open tool
ConverterHEX to RGB Converter
Convert HEX, RGB, RGBA, and HSL with a live preview.
Open tool
ConverterColor Format Converter
Convert any CSS color to HEX, RGB, HSL, HWB, CMYK, and named values at once.
Open tool