Pick 1 to 20 random colors, any, pastel, dark or vivid, with HEX, RGB and HSL codes. Runs in your browser.
Each color is built from three whole numbers: a hue from 0 to 359 degrees, a saturation in percent and a lightness in percent. The tool converts those to red, green and blue values from 0 to 255 and then to a HEX code such as #5E60CE. Every number is picked on its own and every value in its range is equally likely. The HSL you see in the table is read back from the final RGB values, not from the numbers drawn, so the HEX, RGB and HSL on one row always describe the same color. It can differ from the drawn numbers by one step, which comes from rounding to whole RGB values.
Any color uses the full ranges: hue 0 to 359, saturation 0 to 100% and lightness 0 to 100%. That means a few picks come out near black, near white or grey, as a true uniform draw would. Pastel is soft and light: saturation 45 to 90% and lightness 78 to 90%. Dark is deep: saturation 30 to 100% and lightness 10 to 30%. Vivid is strong: saturation 80 to 100% and lightness 45 to 60%. All three of those use every hue. These ranges are the whole definition, so you can reproduce them in your own code.
You can ask for 1 to 20 colors. The big swatch and the large HEX code show the first color. The table lists every color with its HEX, RGB and HSL, and the text box below holds the HEX codes one per line, ready to copy into a stylesheet or a design file. Colors in one result can repeat only by chance; the tool does not check, and with millions of possible colors a repeat is very unlikely. To turn a code into CMYK, check contrast or edit it, paste it into the Color Converter. To blend two colors, use a color mixer.
The draw uses your browser's secure random source when available, and falls back to the browser's ordinary random function when it is not. Nothing you pick is sent anywhere, and your count and kind are remembered in this browser while the colors are not. A random color is a starting point for sketches, games, test data and placeholder art. It does not check contrast, so test text on a color before you use it, and it does not build a matching palette. For a palette taken from a photo, use the palette tool on this site.
In Any color mode, every hue, saturation and lightness value has the same chance, so the result is not an even spread over all RGB colors. Mid lightness is as likely as extreme lightness. Pastel, dark and vivid draw from smaller, fixed boxes of values.
Pastel is saturation 45 to 90% and lightness 78 to 90%. Dark is saturation 30 to 100% and lightness 10 to 30%. Vivid is saturation 80 to 100% and lightness 45 to 60%. All of them use hue 0 to 359 degrees.
The HSL is worked out again from the whole-number RGB values, so it always matches the HEX. A color drawn as hsl(240, 50%, 50%) is #4040BF, and reading it back gives the same numbers, but some draws shift by 1 because RGB has only 256 steps per channel.
No. Each color is drawn separately, so the colors in one result are not designed to work together. Use Pastel or Vivid for a more consistent set, or pull a palette from a photo with the Color Palette from Image tool.
No. The colors are made in this tab and stay in this tab. Only your options, such as the count and the kind, are saved in this browser. The page counts visits with Google Analytics, and that count never includes anything you picked.