Random Color Generator
Generate one random 24-bit sRGB color and copy its HEX, RGB or rounded HSL value. Use the preview as a starting point, then check contrast and palette accessibility.
Tool inputs are processed on your device. Anonymous usage events are recorded separately.
How to use it
- 1
Generate a color
The browser draws three random bytes for red, green and blue, then displays the 24-bit sRGB color as a swatch.
- 2
Copy a representation
Copy HEX, RGB or HSL. HSL hue, saturation and lightness are rounded to whole numbers, so it is a display-friendly conversion.
Click Generate color to draw three random 8-bit channel values using the browser's crypto.getRandomValues API. Together, red, green and blue select one of 16,777,216 possible 24-bit sRGB colors. For example, channel values (255, 0, 0) correspond to HEX #FF0000 and RGB rgb(255, 0, 0); the HSL value for that red is shown as hsl(0°, 100%, 50%).
The tool displays the selected value as HEX, RGB and HSL. HSL values are rounded to whole units, so converting those rounded values back may slightly change the RGB channels. Copy the HEX or RGB value when you need the exact generated channel values.
This creates one color, not a coordinated palette. It does not test text contrast, accessibility, color-blind perception or whether a color fits a brand. Before use in an interface, test foreground/background contrast and confirm the color works for the design's role. The color converter can convert a chosen color into other notation formats.
The color is generated locally. A limited usage event reports the tool ID, timing and success status, not the selected color.
FAQ
How is a color selected?
The tool fills a three-byte array with crypto.getRandomValues and maps each byte to one 8-bit RGB channel. This samples from 16,777,216 possible channel combinations; it is intended for color exploration, not security decisions.
Does it generate an accessible palette?
No. It generates one color at a time and does not evaluate contrast, color-vision differences, brand fit or harmony. Check text/background contrast and test the color in your design before use.
How are RGB and HSL values calculated?
RGB uses the three generated byte values from 0 to 255. HSL is derived from those channels and rounded to whole degrees or percentages, so converting the rounded HSL back to RGB may not reproduce the exact same color.
Related tools
Color Converter
Free color converter: convert between HEX, RGB and HSL with a live swatch preview. Type in any format and get the other two instantly. No sign-up.
Random Number Generator
Generate random integers from a chosen whole-number range using your browser’s Web Crypto API. Request up to 100 results, with an optional no-duplicates setting.
UUID Generator
Generate UUID v4 identifiers in your browser, one at a time or in a batch of up to 100. Choose uppercase or lowercase and keep or remove hyphens.
Password Generator
Generate a random password in your browser with a selectable length, character sets and ambiguous-character filter. Read how strength estimates and clipboard privacy work.