Random Color Generator
Click Generate to draw one featured random color plus a grid of random swatches, each labelled with its lowercase hex code. Set the palette size from 1 up to 24 swatches, and copy any code with a single tap. The featured color even chooses black or white text automatically so its hex stays readable on top of the swatch.
How to generate random colors
- Set the Palette size field to how many swatches you want, from 1 to 24.
- Click the Generate button to draw a fresh featured color and a new palette.
- Read the large featured color, whose hex code is shown in readable black or white text.
- Scan the palette grid below, where every swatch shows its own hex code.
- Use Copy hex on the featured color or Copy on any swatch to grab the code.
- Click Generate again as many times as you like until a set works for you.
Examples
One featured random color
Click Generate
A large swatch of a color such as #3f8ec2 with a Copy hex button
A small palette
Set Palette size to 5, click Generate
One featured color plus a grid of 5 random swatches, each with its hex code
Maximum palette
Set Palette size to 30, click Generate
Palette size is clamped to 24, so you get 24 swatches
Frequently asked questions
What color format do I get?
Every color is a standard six digit hex code in lowercase, like #3f8ec2, made from red, green and blue channels of 00 to ff. That format drops straight into CSS, design tools and most code editors.
How are the colors randomized?
Each of the three channels is drawn independently from your browser's built in random function, then scaled to a 0 to 255 value and written as hex. Because all three vary freely, any of the roughly 16.7 million RGB colors can appear.
How many colors can one palette hold?
Between 1 and 24 swatches. The field is capped at 24 so a stray large number cannot flood the page, and typing anything above it, or a zero, snaps back into that range.
Why is the featured hex code sometimes black and sometimes white?
The tool measures the perceived brightness of the featured color using the standard luminance weights and picks black text on light colors and white text on dark ones, so the code stays legible on any background.
Can I control the hue or lock a color I like?
Not in this tool. It draws fully random colors with no hue, saturation or lightness filter, and it does not pin a swatch between clicks. Copy any code you want to keep before you generate again.
Why do I get a completely different set every time I click?
That is intended. Each click of Generate draws new random values for the featured color and every swatch, so you can keep rolling until a combination appeals to you.
Are these palettes color coordinated?
No. Each swatch is independent, so a palette is a spread of unrelated colors rather than a harmonized scheme. For matched tints or a gradient, a dedicated shades or gradient tool is a better fit.
Does it work offline and keep my activity private?
Yes. Colors are generated entirely in your browser with no network calls, so nothing about what you generate is sent anywhere and the tool keeps working with no connection.
Can I get the same color back later?
Only if you copied its hex code. The generator does not save a history, so once you click Generate the previous set is replaced. Paste a saved code into any design tool to reuse it exactly.
Learn more
- Reading and using random hex color codes
What the six digits in a hex color mean, how this generator builds them, and how to turn a random swatch into a usable part of a design.
Related tools
Gradient Generator
Generate CSS gradient code from color stops online. Pick colors, set the angle, switch between linear and radial, then copy the gradient.
Color Shades Generator
Generate tints and shades from one hex color online. Pick a base color and get lighter and darker steps toward white and black, ready to copy.
Air Fryer Converter
Convert any conventional oven recipe to air fryer settings. Lower the temperature by 25 F and cut the cook time by about 20 percent automatically.
Baker's Percentage Calculator
Turn a bread formula into grams with baker's percentages. Flour is 100 percent, enter water, salt and yeast percents to get weights and hydration.
Baking Pan Converter
Swap one baking pan for another and scale the batter to fit. Compares pan areas for round, square and rectangular pans and gives a batter scale factor.
Binary to Decimal
Convert binary to decimal online. Paste any binary number, with or without spaces, and get the exact base-10 value instantly. Runs in your browser.