About the Random Color Generator
Sometimes you just need a colour you did not choose: for a test, for a placeholder or for inspiration. This generator picks random colours and shows each as a HEX code, an RGB value or an HSL value, or all three. You can make up to 200 at once and copy the list. The random numbers come from your browser's secure generator. Type how many colours you want and the format and the random colours appears at once, with a few related figures underneath, and you can copy the result with one tap. The sums run in your browser, so nothing you enter is uploaded.
Updated October 2026
How to use the Random Color Generator
- 1Enter how many colours you want and the format.
- 2Pick the units or options from the menus if the random colours tool offers them.
- 3Read the random colours in the large result box.
- 4Look at the extra rows for related figures.
- 5Press Copy result to keep the answer.
When you need the random colours
Designers use random colours for inspiration, developers to colour test data, charts and avatars, and teachers to show colour models. Game makers use them for random tints.
Fully random colours are often muddy, because most points in the colour space have medium brightness and low saturation. If you want pleasant palettes, use the Color Palette Generator, which builds colours that go well together.
How the random colours is worked out
Each of red, green and blue is chosen at random from 0 to 255 with equal chance. The HEX code is the three numbers written in base 16, and HSL is calculated from them. A batch of 8 colours might begin #3A7BD5, #E0A458 and #9C2F4B. In the RGB format the first is rgb(58, 123, 213), and in HSL it is hsl(215, 62%, 53%). Each press of Generate gives a new set.
Every answer on this page comes from that one rule, so you can check any result by hand with a calculator. The figures shown underneath, such as other units, are conversions of the same answer.
- Three formats
- Up to 200 at a time
- Secure random numbers
Mistakes to avoid with random colours
The generator makes no promise about contrast or accessibility: a random text colour on a random background can be unreadable. Check pairs you plan to use with the Color Contrast Checker.
On phone and computer
On a phone, type into the boxes one after another and read the random colours underneath; Copy result puts it on the clipboard for a message or a note. On a computer the inputs sit on the left and the answer on the right, so you can change one figure and watch the random colours move. The random color generator works the same on both. To convert a colour you like use the Color Converter, and for hex codes use the RGB to HEX Converter.
Features
- Random is often muddy
- Check contrast
- Palette tool for harmony
- Clear messages when the random colours inputs make no sense
- Copy the result with one tap
- Private: nothing is uploaded
Frequently asked questions
How do I calculate random colours?
Each of red, green and blue is chosen at random from 0 to 255 with equal chance. The HEX code is the three numbers written in base 16, and HSL is calculated from them. A batch of 8 colours might begin #3A7BD5, #E0A458 and #9C2F4B. In the RGB format the first is rgb(58, 123, 213), and in HSL it is hsl(215, 62%, 53%). Each press of Generate gives a new set.
What is the formula for random colours?
Each of red, green and blue is chosen at random from 0 to 255 with equal chance. The HEX code is the three numbers written in base 16, and HSL is calculated from them. The random color generator applies it exactly and rounds only the displayed answer to six significant figures.
Are the colours truly random?
They come from the browser's secure random generator, so each colour channel is chosen with equal chance.
Can I get nice-looking colours?
Use the palette generator for harmonious sets, or choose a narrow range of lightness.
How many colours can I make?
Up to 200 per press.
Is this random color generator free and private?
Yes. It is free, needs no account and runs in your browser, so the numbers you type are not uploaded or stored.