Random Color Generator
Random HEX colors with preview
Each colour is three independent draws between 0 and 255, one per channel, padded to two hexadecimal digits so a channel value of 5 comes back as 05 and the string always stays six digits long. There is no filtering on saturation, brightness or how close the result lands to its neighbours, which is worth knowing if you wanted pleasant colours rather than arbitrary ones — a roll can and does produce something like #0A0A0A or #F5F5F5. For palettes built around a hue rather than three loose channels, use the palette generator, which fixes a base hue and derives the rest from it. How many accepts 1 to 100, and the Uppercase HEX checkbox switches every result to A–F, matching the CSS authoring convention.
Discover a random HEX color and copy it with its CSS variable and a matching tailwind-friendly value. Lock a shade you like and reuse the exact code.
Private Random Color Generator In Your Browser
Random Color Generator is processed locally with client-side JavaScript. Your files never touch a server, and there is no queue to wait in.
How to use Random Color Generator
Type 1 to 100 into How many? — six is the default batch.
Tick or clear Uppercase HEX to control whether letters come back as A–F or a–f.
Press Generate to redraw the whole batch.
Copy the values with the copy button; paste them into a CSS custom property or a Figma variable.
- Each red, green and blue channel is drawn separately between 0 and 255.
- Channel values are zero-padded to two hex digits, so the output is always six characters.
- Batch sizes from 1 to 100 per run.
- An Uppercase HEX toggle applies to the whole batch at once.
- A front-end developer looking for an accent to test contrast ratios on rolls a batch and checks each one against the accessibility threshold.
- A design student exploring hue relationships by eye generates twenty values and plots them on a colour wheel.
- A QA engineer needs an arbitrary, obviously-synthetic colour value for a component test fixture and picks one at random.