Random Color Generator

Generate random colors and palettes, then copy the HEX, RGB, or HSL code.

Click any code to copy it. Lock a color to keep it when you generate again. The space bar makes a new set.

How to use the random color generator

  1. Choose how many colors you want and a style, such as pastel or vibrant.
  2. Press Generate colors or hit the space bar for a new set.
  3. Click any HEX, RGB, or HSL code to copy it. Press Lock on a color to keep it while the others change.

Color styles

  • Any color picks evenly from all 16.7 million colors a HEX code can describe.
  • Pastel keeps colors light and soft, which suits backgrounds and invitations.
  • Vibrant produces saturated, bold colors for accents and buttons.
  • Muted gives dusty, low-saturation colors that are easy on the eyes.
  • Dark creates deep shades for dark themes and backgrounds.
  • Grayscale returns neutral grays from near black to near white.

Building a palette

Lock the one or two colors you love, then keep generating until the rest work with them. Palettes of three to five colors are the easiest to use: one main color, one or two accents, and a neutral for text or backgrounds. Before using a color for text, check that it contrasts enough with its background to be easy to read.

HEX, RGB, and HSL

All three describe the same color in different ways. HEX, like #4F46E5, is compact and common in web design. RGB, like rgb(79, 70, 229), lists the red, green, and blue values from 0 to 255. HSL, like hsl(243, 75%, 59%), describes hue, saturation, and lightness, which makes it easier to adjust a color by hand.

Frequently asked questions

How do I copy a color code?

Click it. The code is copied to your clipboard, and the label briefly changes to confirm.

Are the colors truly random?

Yes. They’re generated with your browser’s cryptographically secure random number generator. Within a style, the hue, saturation, and lightness are each picked at random from that style’s range.

Can I keep a color I like?

Yes. Press Lock on that color. It stays in place when you generate again, until you unlock it.