Hex Color Generator
Generates a random 24-bit colour and shows its hex code (e.g. #3B82F6) alongside a preview swatch, useful for design inspiration, placeholder colours or picking a random accent.
What this generator does
Produces a random colour as a six-digit hexadecimal code, the form CSS and design tools accept directly. Every one of the 16,777,216 possible 24-bit colours is equally likely, so results are spread across the whole colour space rather than favouring pleasant mid-tones — expect plenty of muddy browns and near-blacks alongside the vivid ones.
How to use this tool
- Press generate to get a random colour.
- Copy the hex code, or generate again for a new one.
Understanding the controls
- Generate
- Each press draws a fresh 24-bit colour. Every one of the 16,777,216 possible values is equally likely, so results are genuinely spread across the whole space rather than clustered in pleasant mid-tones.
Worked examples
- Format
- #1E90FF — a hash followed by three pairs of hex digits for red, green and blue
- Range per channel
- 00 to FF, which is 0 to 255 in decimal
Common use cases
- Design inspiration and moodboards
- Placeholder colours for mockups
- Randomising a UI accent colour
Limitations and good to know
- A uniformly random colour is not a designed colour. For a set that works together, the colour palette generator picks a coordinated group rather than independent points in the space.
Practical tips
- Check any colour you intend to use for text against its background for contrast — a random colour has no reason to be readable.
- Generate several and keep the family that works together, rather than building a palette from a single draw.