Random Color Generator
Generate random colors in HEX, RGB, HSL, and OKLCH with one click or continuously.
How to use Random Color Generator
Frequently Asked Questions
How random is the color generation?
Colors are generated using Math.random() seeded by the browser — truly random within the allowed range. Each color component (hue, saturation, lightness) is generated independently. If you have locked specific channels, only the unlocked channels are randomized. For cryptographically random values, this tool is not designed for security use — it is purely for design and visual work.
What is the difference between HEX, RGB, HSL, and OKLCH?
HEX and RGB both describe colors by red, green, and blue channel values — HEX uses base-16 notation (#FF5733) and RGB uses decimal (rgb(255, 87, 51)). HSL uses hue, saturation, and lightness — more intuitive for adjusting colors. OKLCH is a perceptually uniform format used in modern CSS where equal numeric steps produce equal perceived changes in lightness and chroma.
Can I use the generated colors directly in CSS?
Yes. All four formats are valid CSS color values. HEX is the most widely used in stylesheets. RGB and HSL are valid in both the legacy rgb(255, 87, 51) syntax and the modern rgb(255 87 51) space-separated syntax. OKLCH is supported in all modern browsers and is the recommended format for new CSS color work due to its perceptual uniformity.
What does locking a color channel do?
Locking a channel — hue, saturation, or lightness — keeps that value fixed while the unlocked channels continue to randomize. For example, locking hue at 210° means every generated color will be a blue, varying only in saturation and lightness. This is useful when you need color variety within a specific color family for a design palette.
Can I generate a full color palette instead of single colors?
Yes. Switch to Palette Mode to generate 5 or 10 colors simultaneously. Each color is generated independently and randomly. Use the generated palette as a starting point for a design system or a chart color scheme. You can regenerate the full palette or lock individual colors while regenerating the rest.
Recommended
Related Tools
Color Picker & Converter
Pick colors and convert between HEX, RGB, RGBA, HSL, HSV, CMYK and CSS color formats instantly.
Color Palette Generator
Generate beautiful color palettes — complementary, triadic, analogous, monochromatic, and more.
CSS Gradient Generator
Create beautiful linear, radial, and conic CSS gradients visually — copy the CSS code in one click.