Random CSS hex colors, ready to paste
Each color is a 24-bit value (0 to 0xFFFFFF) formatted as a six-digit lowercase hex string with a leading #. The output is straight CSS: #7ab8d4 works in color:, background-color:, border-color:, and any other property that takes a CSS color.
Set Count between 1 and 200. The output panel emits one color per line. Each draw is independent, so duplicates can appear in larger batches but they are very unlikely below 50 colors.
For arbitrary alphabets use the random string generator with a custom hex pool. For random IDs use the UUID generator. For random numbers in a range use the random number generator.
How to use random hex color generator
- 1Open the tool. The input panel can be left empty.
- 2Set Count in the option panel (default 10, maximum 200).
- 3The output panel fills with that many hex colors, one per line.
- 4Click Copy to grab the list.
- 5Click Download to save as a plain-text file.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Six-digit lowercase hex
Every color is exactly seven characters: # followed by six lowercase hex digits. Pastes straight into CSS, SVG, Figma color fields, and HTML attributes.
Zero-padded values
Small values like 0x00ffaa are padded so the output is always six digits. 0xff renders as #0000ff, not #ff. CSS parsers require the full six.
Bulk count up to 200
Count ranges from 1 to 200. Useful for sampling a large palette or generating fixture colors for a UI test.
Uniform across the 24-bit space
Each color is a uniform sample from the 16,777,216 possible 24-bit RGB values. No bias toward saturated or desaturated colors.
Browser-only
Computed in JavaScript via Math.random() and Number.prototype.toString(16). No upload, no log.
Worked example
Five random colors at default Count 5. Each is six lowercase hex digits with a leading #; pastes straight into CSS.
Count: 5
#7ab8d4 #3e2a91 #fcd56a #0a4f3c #b21d44
Settings reference
| Option | Effect on output |
|---|---|
| Count | How many colors to emit. Default 10, minimum 1, maximum 200. One per line. |
| Format | #RRGGBB, lowercase hex, zero-padded to six digits. |
| Color space | 24-bit sRGB. No alpha channel; if you need #RRGGBBAA, append ff manually. |
| Distribution | Uniform across the 16,777,216 possible values. |
| Random source | Math.random(). |
FAQ
Can I get a color with alpha?
#RRGGBB). Append two hex digits after copying for #RRGGBBAA; for example, ff for fully opaque, 80 for ~50% opacity.