BrowserTools

Random Color Generator

Random HEX colors with preview

By Guga — BrowserTools maintainer, Tbilisi, Georgia Updated 2026-09-12
Free Private No uploads
What is Random Color Generator?

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.

Step-by-Step

How to use Random Color Generator

1

Type 1 to 100 into How many? — six is the default batch.

2

Tick or clear Uppercase HEX to control whether letters come back as A–F or a–f.

3

Press Generate to redraw the whole batch.

4

Copy the values with the copy button; paste them into a CSS custom property or a Figma variable.

Key Capabilities
  • 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.
Common Use Cases
  • 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.
Clear Answers

Frequently Asked Questions

Do I get RGB or HSL values as well?
You get HEX only. That single format is what CSS, Figma and every design token pipeline consumes, and converting the other notations is a matter of arithmetic you can do in the same stylesheet if you need it.
Why did I get three almost identical greys in a row?
Channels are independent, so nothing discourages a result where all three land near the same value. There is no harmony logic here — that is the difference between this tool and the palette generator.
Are the values suitable as password material?
Not on their own. Three random bytes is 24 bits, far too little for any secret, even though the underlying draw is cryptographic. Use the password generator for credentials.