Random color: reading one color as HEX, RGB and HSL.
Roll a random color and read it as HEX, RGB or HSL.
Open Random colorWhat this tool tells you
Random colors are useful when you need a placeholder accent, a test fixture, or the seed of a palette you build out from. The generator picks three random bytes and shows the same color written three ways, so you can copy whichever notation your design tool expects. Everything is computed in the page, and no value is sent anywhere.
Try it in SiteTrace
- Pick the notation your tool expects, since HEX, RGB and HSL all describe the same color in different forms.
- Generate a color and read the swatch and the three values together, since they all refer to one result.
- Copy the value into the color field of your design tool or stylesheet, then look at it in context.
- Check the contrast of that color against the background it will sit on, because random picks rarely suit text.
- Generate again whenever the result does not fit, since each run produces a completely different value.
This utility works locally in your browser. The screenshot shows one example result.
What your result looks like

How to read the information
- HEX
- Six hexadecimal digits after a hash, where each pair of digits is one color channel running from 00 to FF.
- RGB
- The red, green and blue amounts, each on a scale from 0 to 255. A bigger number pushes the mix toward that channel.
- HSL
- Hue measured as a rotation on the color wheel, with saturation and lightness as percentages. It suits building tints and shades.
- Swatch
- The visual block showing the result. Two screens can render the same value differently, so trust the numbers over the preview.
What the example means
Every run gives a different color, so the one you see is only yours for that moment. Keep the value you choose rather than the screenshot, and pair it with a checked contrast ratio before it carries any text.
On your Mac or Windows PC
Mac instructions
This prints six hexadecimal digits in Terminal. Put a # in front of them to turn the output into a CSS color you can paste straight into a stylesheet.
openssl rand -hex 3A check from your computer reflects your own connection. It may differ from a remote test or the mockup shown here.
Keep this in mind
A random color carries no design intent, and a large share of them fail a contrast check against a white or dark background. Nothing here suggests a palette or tests legibility, so treat the result as a starting point for your own choices.