Skip to content

Random color generator

Generate random colors for design ideas, games and testing. Choose any color, pastels, vivid or dark tones, and copy each color as hex, RGB or HSL.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Choose the color style: Any, Pastel, Vivid or Dark.
  2. Set how many colors you want (1–12).
  3. Click New colors.
  4. Copy the hex, RGB or HSL code you like.
Try it now

Four color styles

  • Any picks red, green and blue values completely at random from 0 to 255. Any of the 16.7 million colors can come up, which means plenty of muddy browns and grays as well as bright hues.
  • Pastel picks a random hue with medium saturation and high lightness: soft pinks, mints, lavenders and baby blues.
  • Vivid uses high saturation and medium lightness for bold, punchy colors.
  • Dark gives deep, low-lightness shades such as navy, forest green and burgundy.

Pastel, Vivid and Dark choose the hue at random from the whole color wheel and keep saturation and lightness in a range, which is why they look consistent.

Generate up to 12 colors at a time. Each click replaces the whole set, so copy any color you want to keep before you click again. If you're looking for a background, Pastel and Dark tend to give the most usable results; Vivid is better for accents, buttons and highlights.

Hex, RGB and HSL

Every color is shown in three formats, each with its own copy button:

FormatExampleUsed in
Hex#3A86FFCSS, HTML, design apps
RGBrgb(58, 134, 255)CSS, code, image editors
HSLhsl(217, 100%, 61%)CSS, adjusting lightness

Hex is just RGB written in base 16: 3A = 58, 86 = 134, FF = 255. HSL describes the same color as hue (0–360° around the color wheel), saturation and lightness, which makes it easy to create lighter or darker variants by changing one number.

Readable text on every swatch

The color code on each swatch is drawn in black or white, whichever has better contrast with that color. It uses the relative luminance formula from the WCAG accessibility guidelines, so you can see at a glance whether a color works better with dark or light text.

Ideas for using random colors

  • Design inspiration: break out of your usual palette. Generate a batch, keep the ones you like and build from there.
  • Placeholder colors for charts, avatars, tags and UI mockups.
  • Games and art prompts: draw or paint something in the color you get.
  • Teaching color theory: compare hex values with the colors they produce.
  • Testing: check how a component looks with arbitrary background colors.

To turn a color you like into a matching set of harmonious colors, use the color palette generator.

Good to know

Colors are generated with your browser's cryptographic random generator and nothing is saved, so copy the codes you want to keep. Colors can look slightly different on different screens, especially between phones and uncalibrated monitors. For print work, check colors on a proof, because screens use RGB while printers use CMYK.

Frequently asked questions

How do I get a random hex color?

Click New colors and copy the hex code (like #3A86FF) from any swatch.

How many colors are possible?

With 256 values each for red, green and blue, there are 16,777,216 colors.

How are pastel colors generated?

A random hue with medium saturation (50–80%) and high lightness (78–90%).

Can I generate more than one color at a time?

Yes, up to 12 at once.

Last updated: November 12, 2026

Recommended

Similar tools

If Random color generator helped, you may need these too.

See all in category →

People also use