Random RGB colors in any format
An RGB color is made of three numbers from 0 to 255 for red, green and blue. Press Generate to get a list of random colors, choose how many you want, and pick the format that matches where you will use them.
| Format | Example | Use |
|---|---|---|
| rgb(r, g, b) | rgb(58, 123, 213) | CSS, the classic form |
| rgb(r g b) | rgb(58 123 213) | CSS, modern form with spaces |
| rgba(r, g, b, a) | rgba(58, 123, 213, 0.6) | CSS with transparency |
| rgb(r g b / a%) | rgb(58 123 213 / 60%) | CSS, modern form with transparency |
| r, g, b | 58, 123, 213 | Plain numbers for code and APIs |
| [r, g, b] | [58, 123, 213] | An array to paste into JavaScript or Python |
| rgb(r%, g%, b%) | rgb(23%, 48%, 84%) | CSS with percentages |
Random transparency
The two formats with an alpha value add a random opacity between 0.1 and 1, so you can see how colors look when they are partly see-through. The swatches are drawn over a checked background to show the transparency.
Style and hue
By default each of the three numbers is chosen at random, which gives any color. If you want a certain look, choose a style such as pastel, dark or vivid, or a hue such as blue or green. The generator then picks colors from that range and converts them to RGB.
How the numbers are chosen
The random numbers come from your browser secure random number generator, and the choice avoids the small bias that a simple remainder calculation can add, so every value from 0 to 255 is equally likely.
Copying
Click Copy all to copy the whole list, one color per line. Click a swatch to copy just that color. Nothing is sent to a server.
For hex codes, use the random hex color generator. For a single color with its HSL and CMYK values, use the random color generator, and for harmonious sets, the random palette generator.