EasyConvert

Random Color Generator

Need a random colour? Press the button and this generator picks one — showing the hex code, the RGB values and the HSL values, with a colour swatch so you can see it. Designers use it for palettes and inspiration, developers for testing layouts and placeholder colours, and teachers for colour games.

…

How to use this converter

Press “New colour” to generate a random colour. The hex code, RGB and HSL values appear with a swatch. Press “Copy hex code” to copy it.

Formula

A hex colour is three pairs of digits: red, green and blue, each 00–FF (0–255). #FF5733 is red 255, green 87, blue 51. There are 256 × 256 × 256 = 16,777,216 possible colours. HSL describes the same colour by hue (0–360°), saturation and lightness: #FF5733 is HSL(11°, 100%, 60%).

Every colour is picked at random from all 16,777,216 possible hex colours (256 × 256 × 256), so repeats are rare and every shade is equally likely — from near-black to near-white, pastels to neons. Copy the hex code and paste it into your design tool, website stylesheet or slide.

Example colours

FromEquals
#FF5733RGB(255, 87, 51) · HSL(11°, 100%, 60%)
#3385FFRGB(51, 133, 255) · HSL(216°, 100%, 60%)
#33FF57RGB(51, 255, 87) · HSL(131°, 100%, 60%)
#FFD700RGB(255, 215, 0) · HSL(51°, 100%, 50%)
#000000RGB(0, 0, 0) · HSL(0°, 0%, 0%)
#FFFFFFRGB(255, 255, 255) · HSL(0°, 0%, 100%)

Frequently asked questions

How does the random color generator work?

It picks three random numbers from 0 to 255 (red, green, blue) and converts them to a hex code, RGB and HSL. Every one of the 16,777,216 possible colours is equally likely.

How many colours are there in hex?

16,777,216 — 256 reds × 256 greens × 256 blues. That is every colour a standard screen can show.

What is the difference between hex, RGB and HSL?

They are three ways of writing the same colour: hex (#FF5733) and RGB (255, 87, 51) both give red, green and blue values; HSL gives hue, saturation and lightness, which is easier when you want a lighter or darker shade of the same colour.

Can I copy the colour?

Yes — press “Copy hex code” and paste it into your design tool, website stylesheet, slide or code editor.