Skip to content
hateitall

Random Color Generator

Get fresh colour ideas with the codes ready to paste into your design or CSS.

Processed locallyIn: Count, Colour rangeOut: Colour, CSS

Loading tool…

How to use random color generator

  1. Choose any colour, or a kind such as pastel, vivid, dark, muted or greys.

  2. Set how many colours you want.

  3. Press New colours until something catches your eye.

  4. Copy a hex or RGB code, the whole list, or download CSS variables.

What this tool does

  • Any colour mode draws all 24 bits at once, so each of the 16,777,216 colours is equally likely.
  • Each swatch shows HEX, RGB and HSL and whether black or white text reads better on it.
  • Contrast ratios follow the WCAG formula.
  • Exports the set as CSS custom properties.

How the result is verified

Each swatch's contrast figure is computed from the colour's own RGB values with the WCAG luminance formula, so you can check it against any contrast checker.

Frequently asked questions

What makes a colour pastel here?

Pastels are drawn with a random hue, fairly high saturation and high lightness (78 to 90%), which gives soft, light tints.

Can I get a colour palette instead?

This tool gives independent random colours. For colours that belong together, such as complementary or analogous sets, use the colour palette generator.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

50 to 950 scales, harmonies and tints from one colour

Colour · HEX · CSS colour→ CSSLight on device

HEX, RGB, HSL, OKLCH, OKLab, Lab and P3 with gamut warnings

Colour · HEX · CSS colour→ HEXLight on device

Pick exact HEX, RGB and HSL colours from any image

PNG · JPEG · WebP +→ HEXLight on device

Secure random numbers in any range, unique or sorted, with decimals

Number range→ NumberLight on device