Need a random color for a design, a website or a craft project? This free online random color generator gives you real HEX, RGB and HSL values in an instant — bias the result toward light, dark, muted or vivid, build a complementary, analogous, triadic or monochromatic palette from color theory, and keep every color in a batch visually distinct. Nothing to install, and every color is generated right in your browser.
What is a random color generator?
A random color generator is a tool that picks one or more colors at random and hands you their exact codes — a HEX value like #3341B8, an RGB value like rgb(51, 65, 184), and an HSL value like hsl(233, 57%, 46%) — so you can drop that color straight into a design tool, a stylesheet or anywhere else a color value is needed. You'll also see the same idea called a color randomizer, a random color picker or a random color chooser; they all describe the same job, done instantly instead of scrolling a color wheel or guessing at a hex code by eye.
This one goes a step further than a single random swatch: it can generate a batch of independent random colors, or switch to Palette mode and build a small set of colors that actually relate to each other through real color theory.
How to use this random color generator
It takes seconds to pick a random color, and there's nothing to install:
- Choose a mode. Random colors gives you independent, unrelated colors; Palette builds a set of colors related to one random base color.
- Set a quantity (Random colors mode). Anywhere from 1 to 50 colors per batch, using the stepper or by typing a number.
- Open Options if you want more control. Bias the lightness and saturation, or turn on "Keep colors visually distinct" — or skip this and use the defaults.
- Hit Generate. Your colors appear as swatches (or as a plain hex list, if you've switched Display).
- Copy what you need. Click any single swatch or its hex value to copy just that color, or use Copy result / Copy as CSS vars for the whole batch.
Random colors mode: bias toward light, dark, muted or vivid
In Random colors mode, each color is drawn independently, so you can generate anywhere from a single random color chooser up to a 50-color batch in one go. Open Options to narrow what kind of colors come up:
- Lightness — Any, Light or Dark, biasing how bright or how dark the generated colors are.
- Saturation — Any, Muted or Vivid, biasing how intense or how gray-toned the colors are.
These two biases combine, so "Light" + "Muted" gives you soft pastels, while "Dark" + "Vivid" gives you deep, saturated jewel tones — useful when you want a random color but still need it to fit a particular mood or brightness range, rather than a fully unconstrained pick.
Palette mode: complementary, analogous, triadic and monochromatic
Switch Mode to Palette and the tool works differently: instead of independent draws, it picks one random base color and then builds a small set of related colors around it, using one of four real color-theory harmonies:
- Complementary — the base color plus its opposite on the color wheel (180° apart), for high-contrast pairings.
- Analogous — the base color plus its close neighbors (±30°), for a harmonious, low-contrast set.
- Triadic — three colors evenly spaced around the wheel (120° apart), for a balanced, vibrant combination.
- Monochromatic — five lightness steps of the very same hue, from a deep shade up to a light tint.
This is the closest this tool gets to a random color palette generator: rather than five totally unrelated random colors, you get a set built to actually work together, which is closer to what most design and branding work needs than a raw batch of random hues.
Keep every color in a batch visually distinct
Because colors are picked independently in Random colors mode, a large batch can sometimes land two or three shades that look nearly identical. Turn on "Keep colors visually distinct" under Options and the tool checks each new candidate's distance from every color already accepted into the batch — using a weighted color-distance formula, not just a simple hue check — before accepting it, trying up to 40 times per slot. If the batch is large or the lightness/saturation constraints are tight enough that no attempt fully clears the distance threshold, it falls back to whichever candidate came closest, rather than either failing or quietly keeping a near-duplicate.
Swatches or hex list — and every color gets a name
Use the Display toggle to switch how results are shown:
- Swatches — a visual grid of color tiles, each with its hex code underneath. Click the swatch itself or the hex code to copy that one color.
- Hex list — a plain-text block listing every color's HEX, RGB and HSL values on one line each. Click anywhere on the block to copy the whole list at once.
Every color, in both views, is also matched against a genuine 148-entry list of standard CSS/X11 named colors (the same names used in CSS, like steelblue, tomato or rebeccapurple) using a weighted color-distance calculation, and the closest name is shown alongside the codes — so a random hex isn't just a string of digits, it's also "~cadetblue" or whatever named color it's nearest to.
Copy your colors as HEX, RGB, HSL or CSS variables
Copy result puts the whole batch on your clipboard as formatted lines (hex, rgb(), hsl() and the nearest name for each color). Copy as CSS vars instead formats the same batch as a ready-to-paste :root block of CSS custom properties (--color-1, --color-2, and so on), which is the quickest way to get a random palette straight into a stylesheet. Reset options returns mode, lightness, saturation, harmony, display and quantity to their defaults in one tap.
How the randomness works
Each color's hue, saturation and lightness are drawn using your browser's Web Crypto API (crypto.getRandomValues), combining three random bytes into a single value, with a fallback to the weaker Math.random() only on the rare browser that doesn't support Web Crypto. To be precise about what this tool does and doesn't do: the base color draw itself is a straightforward random pick, not a rejection-sampled one — the only place a candidate can be rejected and re-drawn is the separate "Keep colors visually distinct" feature described above, which re-rolls a color specifically to avoid near-duplicates, not to correct any bias in the randomness itself.
What can you use a random color generator for?
A quick, unbiased color pick or palette is useful well beyond picking a favorite color:
- Design inspiration — breaking out of your go-to colors by starting from a random base you didn't choose yourself
- Palette generation — Palette mode's complementary, analogous, triadic and monochromatic harmonies for a quick, usable color scheme
- Web design and coding — random colors with real HEX/RGB/HSL codes and a one-click "Copy as CSS vars" block for prototyping UI themes
- Art and craft projects — random color prompts for painting, yarn or fabric combinations, or classroom color-theory exercises
- Games and randomized decisions — assigning a random color to a team, a token or an option instead of picking by hand
Random color generator vs. a single random-color picker
Some sites offer nothing more than one random color on page load, refreshed by reloading the page. That's fine if you only ever want one color and don't mind reloading, but it can't give you a batch, a palette or the control this tool offers — no quantity, no lightness or saturation bias, no way to keep a batch visually distinct, and no complementary/analogous/triadic/monochromatic palette option. This tool covers that single-swatch use case too — set quantity to 1 — while also handling everything from a 50-color batch down to a five-step monochromatic palette from the same interface.
Your colors stay on your device
Every color is generated locally in your browser — nothing is sent to a server, and no account is needed. Only your option choices (mode, lightness, saturation, harmony, display and quantity) and your theme are remembered between visits, saved in your browser's local storage; the Recent history and the colors themselves reset each time you leave the page. There's nothing to clear beyond closing the tab.
Need a random number, letter or word instead of a color? See the Random Number Generator, Random Letter Generator and Random Words Generator.
Frequently asked questions
Is there a free random color generator online?
Yes — this page is one. Open it on any phone or computer, hit Generate, and you'll get random colors with HEX, RGB and HSL values instantly. No download, account or payment is needed.
What is a random color generator?
A random color generator (also called a color randomizer or random color picker) is a tool that picks one or more colors at random and gives you their codes — HEX, RGB and HSL — so you can use them in a design, on the web or anywhere else a color value is needed.
Does it give me HEX, RGB and HSL, not just one format?
Yes. Every color this tool generates comes with all three: a HEX code, an RGB value and an HSL value, shown together in the swatch info, the hex-list view and the copy-out text.
Can I generate a palette, not just individual colors?
Yes. Switch Mode to Palette and choose a harmony — Complementary, Analogous, Triadic or Monochromatic — and the tool builds a small set of colors related to one random base color by real color theory, not just more random picks.
Can I keep every color in a batch visually distinct?
Yes. Turn on "Keep colors visually distinct" under Options in Random colors mode, and the tool checks each new color's distance from the ones already in the batch before accepting it, so you don't end up with several near-identical shades.
Does every color get a name?
Yes. Each generated color is matched to its nearest neighbor in a 148-entry list of standard CSS/X11 named colors (like "steelblue" or "tomato"), shown next to the swatch and in the hex list, so you get a plain-language name alongside the exact codes.
Can I generate only a specific color, like blue?
No. You can bias the result toward light, dark, muted or vivid, but there's no way to lock the hue to a specific color family like "blue only" — every generated color's hue is still random.
Can I use this instead of writing my own random-color code?
For quickly grabbing a color or a palette while you're designing, yes — it's faster than writing a snippet. If you specifically need random-color generation running inside your own app or script, you'll still want your own code; this tool is built for picking colors in the browser, not for embedding.