Free · No sign-up · Private

Color Generator

Generate random colors and get their HEX, RGB and HSL values.

Quick answer

Press Generate color to get a random, well-saturated color with its HEX, RGB and HSL codes ready to copy. HEX is used in CSS and design tools, RGB lists the red, green and blue amounts from 0 to 255, and HSL describes hue, saturation and lightness.

Color GeneratorRuns in your browser
HEX
#2680d9
RGB
rgb(38, 128, 217)
HSL
hsl(210, 70%, 50%)

Step by step

How to use the Color Generator

01

Generate a random color.

02

See HEX, RGB and HSL values.

03

Copy any format.

Worked examples

One color in three formats

ColorHEXRGBHSL
Signal red#e12424rgb(225, 36, 36)hsl(0, 76%, 51%)
Ocean blue#2672d9rgb(38, 114, 217)hsl(215, 70%, 50%)
Sage green#8fae8brgb(143, 174, 139)hsl(113, 18%, 61%)

Good to know

Need a whole palette?

The color palette generator builds five matching colors at once, with presets for wedding palettes, pastels, earth tones and more, and lets you lock the colors you like.

HEX, RGB or HSL?

All three describe the same color. HSL is easiest to adjust by hand: change the lightness to get tints and shades of the same hue, or the hue to move around the color wheel.

Choosing readable text colors

A random color makes a good background or accent, but text on it needs enough contrast. WCAG guidelines ask for a contrast ratio of at least 4.5:1 for normal text. Dark text usually suits light, pale colors and white text suits deep, saturated ones.

FAQ

Frequently asked questions

Why are the colors never grey?

Saturation and lightness are kept in a middle range so every result is a usable, visible color.

How do I use a HEX code?

Paste it into CSS (color: #2672d9), Figma, Canva or any design app.