EN UA RU

Random Color Generator

This random color generator fills the panel with a new color in one click and gives its code in HEX, RGB and HSL — or builds a palette of up to eight colors, random or matched by the rules of color harmony. Each color is drawn on your device by the browser's cryptographic generator, so the choice is fair and cannot be predicted.

Press “Generate color”
How many colors

or press Space

Recent colors

Your results will appear here

How to generate a random color

  1. Press Generate color or hit the Space key: a random color fills the whole panel and shows its code.
  2. Click the HEX, RGB or HSL value under the button to copy it.
  3. Choose the Tone: any, pastel, vivid or dark.
  4. For a palette, set the number of colors, up to 8, and the Palette type: random, analogous, complementary, triadic or monochrome.
  5. Click a stripe to copy its HEX code, copy all the codes at once, or share the link to the palette.

What a random color is useful for

  • Design and illustration. A random color pulls you away from your usual shades: generate until one catches your eye, then build a palette around it.
  • An accent for a website or a presentation. Take the vivid tone and a complementary palette: one color for buttons and headings, its opposite for highlights.
  • Test data for CSS. Give every block of a layout its own background, and you see at once where it begins and ends.
  • A color for a team or a character. Give each team from the team generator a color of its own, or let chance choose a hero's cloak or hair.
  • Drawing challenges. Limit yourself to three random colors; for a subject, add a random animal.
  • Art lessons. Show a complementary or triadic palette in full screen to explain how colors work together.

Need a plain color name for a children's game, not a code? Spin the wheel of ten basic colors.

What this color generator can do

  • One color, three notations. HEX, RGB and HSL — for example #3FA7D6, rgb(63, 167, 214) and hsl(199, 65%, 54%). Click any value to copy it.
  • Palettes of up to 8 colors. Several colors appear as stripes. Click a stripe to copy its HEX code; a separate button copies all the codes.
  • Tone. Any, pastel, vivid or dark — one mood for all the colors.
  • A link to the palette. The colors are stored in the address itself, so it opens the same palette on any device.
  • Full-screen mode, a strip of recent colors (a click copies the code) and the Space key for the next color.

Palette types: from analogous to monochrome

The Palette field sets how several colors relate to each other.

PaletteHow the colors relateGood for
RandomEach color is picked independentlySurprises, test data
AnalogousNeighbors on the color wheelCalm, harmonious layouts
ComplementaryOpposite colors on the wheelContrast and accents
TriadicThree colors evenly spaced on the wheelLively, balanced schemes
MonochromeOne hue in different lightnessInterfaces, charts, backgrounds

Is the color really random?

Yes. Every color is drawn with crypto.getRandomValues() — the cryptographically secure generator built into every modern browser and seeded by your operating system. With the tone set to any, every shade has the same chance; pastel, vivid and dark only narrow the range the color is drawn from. In every palette type except random, chance picks the first color and the palette rule places the others. More in the article on how the randomness works.

Frequently asked questions

How do I get a random HEX color?

Press Generate color: the HEX code, such as #3FA7D6, is written on the color and repeated under the button, next to RGB and HSL. Click it to copy. Its six digits — two each for red, green and blue — allow 16,777,216 colors.

What is the difference between HEX, RGB and HSL?

They are three ways to write the same color. RGB gives the amounts of red, green and blue, each from 0 to 255. HEX is the same three numbers in hexadecimal, the usual web notation. HSL means hue, saturation and lightness: change one number to get a lighter or calmer color.

How do I make a random color palette?

Set the number of colors from 2 to 8 and press Generate color — they appear as stripes. A random palette gives unrelated colors; an analogous, complementary, triadic or monochrome one gives colors that go together.

Can I generate only pastel colors?

Yes. Set Tone to pastel, and every color comes out soft and light. Vivid gives saturated colors for accents, dark gives deep shades for backgrounds, and any removes the limit.

Does the color generator show color names?

No, only codes: HEX, RGB and HSL. A name such as “teal” covers thousands of shades, while a code points to exactly one — which is what a stylesheet needs.

Other generators

Random LetterA random letter from A to Z, or up to 20 at once: vowels, consonants, no repeats Number GeneratorRandom numbers in any range: no repeats, exclusions, decimals, lottery sets Wheel SpinnerAdd your own options, spin the wheel and let it pick a winner Random AnimalOne of 220+ animals in a click — to draw, act out or guess Password GeneratorStrong random passwords, passphrases and PINs, made right in your browser Yes or NoAsk a question and get a random yes or no in one click Dice RollerRoll 1 to 10 dice — D6, D20, D100 — or a formula like 2d6+3 Coin FlipHeads or tails in one click, plus series of flips and statistics Random WordsRandom nouns, adjectives and verbs, plus a team game mode for Charades and Pictionary Username GeneratorCool, cute and funny usernames and gamertags with fancy fonts and a length limit Name GeneratorRandom first and last names, fantasy names by race, and names for cats and dogs Random PickerPick names from a list, shuffle the order or split people into teams Giveaway PickerDraw giveaway winners and get a public protocol anyone can check Truth or DareOver 400 clean truth questions and dares for kids, friends and parties Name IdeasName ideas for a team, a channel, a business or a brand — 12 per click Team GeneratorPaste a list of names and split it into random teams or groups of equal size Random CountryOne of 195 countries with its flag and capital — for quizzes, trips and school projects Random QuestionConversation starters and icebreaker questions — a new one with every click