Random Color Generator
Generate random colors in HEX, RGB, and HSL formats. Create palettes and copy color codes instantly.
Random Color Generator tool
Example
Input: Click Generate Color
Result: A random color in three formats, for example HEX #C7481A, RGB rgb(199, 72, 26), HSL hsl(16, 77%, 44%)
A new color is drawn on every click and the HEX, RGB and HSL values always describe the same color. Lock Hue, Saturation or Lightness to keep that part fixed.
- Click "Generate Color" to create a random color with a large preview swatch.
- Click "Generate Palette (5 colors)" for a matched set, then click any swatch to load it into the preview.
- Turn on Lock Hue, Lock Saturation or Lock Lightness, then generate again to change only the unlocked parts.
- Copy the HEX, RGB or HSL code with the copy button next to it.
- Click any color in the history to bring it back.
How Random Colors Are Picked
This generator picks a random color and gives you its HEX, RGB and HSL codes, each with a copy button. Press Generate Color for one color, or Generate Palette (5 colors) for a small matched set.
Colors are built in HSL, which stands for hue, saturation and lightness. Hue is the spot on the color wheel, from 0 to 359 degrees. Saturation is how strong the color is, and lightness is how close it sits to black or white. The tool picks any hue at random. It keeps saturation between 30% and 95% and lightness between 25% and 75%, so you rarely get a dull gray or a color too dark or pale to use.
The lock toggles let you explore one idea at a time. Turn on Lock Hue and each click gives a new version of the same color family. Lock Lightness instead and every new color has the same brightness. That helps when chart labels or tags should all look equally strong. Your last 20 colors stay in the history, and clicking one brings it back.
The palette button starts from a random base hue and adds colors at 30, 60, 180 and 210 degrees around the wheel. You get two close neighbors plus an opposite pair, each with small random changes to saturation and lightness. Click any swatch to load it into the main preview. For named schemes such as triadic or complementary, use the Color Palette Generator. Before you use a random color for text, test it in the Color Contrast Checker.
Frequently Asked Questions
Related Tools
Hex to RGB Converter
Convert hexadecimal color codes to RGB values instantly. Supports shorthand and 8-digit hex with alpha.
Color ToolsColor Palette Generator
Generate harmonious color palettes. Create complementary, analogous, triadic, and split-complementary schemes.
Color ToolsColor Picker
Pick any color visually and get values in hex, RGB, HSL, and CMYK. Interactive saturation panel and hue slider.
Color Tools