Random Color Generator

Random Color Generator

Need one random color, or a quick set of ten? Generate independent RGB colors or choose vivid, pastel, light or dark shades. Lock favorites while regenerating the rest, and copy each HEX, RGB or HSL value. Everything happens on your device.

Possible 24-bit RGB colors16,777,216
Values per red, green or blue channel256

Every color is generated locally using the browser’s secure random number generator. The unrestricted mode draws each red, green and blue channel independently from 0 to 255.

Calculated on your device · formulas checked against known results · How we test

How to use the random color generator

  1. Pick the number of colors. Choose 1 for a single inspiration swatch, 5 for a handful of options, or 10 when you want to compare possibilities quickly.
  2. Select a style. Any RGB color gives an unrestricted draw. Pastel favors lighter, softer colors; vivid emphasizes strong saturation; light and dark favor their corresponding brightness ranges.
  3. Generate. Press Generate colors for a new set. You can regenerate repeatedly without reloading the page, sending a request, or entering an account.
  4. Keep what you like. Select Lock under a swatch; subsequent draws preserve that exact color at its position and replace only unlocked ones. Unlock it to include it in the next draw.
  5. Copy the format you need. HEX is useful in stylesheets, RGB in image editing and CSS, and HSL when editing hue or lightness. Copy all HEX gathers the full set as one code per line.

How random RGB colors work

Each standard RGB color has three channels — red, green and blue — and each channel can be an integer from 0 to 255. That gives 256 × 256 × 256 = 16,777,216 different opaque 24-bit colors. In the unrestricted setting, all three channel values are sampled independently, so every 6-digit color has the same probability of appearing. The browser supplies the randomness on your device, not a remote web service.

A HEX color writes the three channels as pairs of hexadecimal digits. For example, #ff0000 is red (255, 0, 0), #00ff00 is green (0, 255, 0), and #0000ff is blue (0, 0, 255). A six-character HEX code can be pasted directly into a CSS rule such as background-color: #1f4e79;.

Why pastel, vivid, light and dark look different

Unlike the unrestricted setting, style presets choose hue, saturation and brightness first, then convert the result to ordinary RGB. Pastel uses moderate-low saturation and high brightness; vivid uses strong saturation; dark limits brightness; light keeps it high. These modes intentionally sample a narrower range rather than pretending all RGB colors are equally likely. If you need statistically uniform values across the whole color space, use Any RGB color.

Worked color example and readability

Suppose a draw returns #336699. Its channels are red 51, green 102 and blue 153, written rgb(51, 102, 153); its HSL equivalent is hsl(210, 50%, 40%). You can copy the same color in any of these representations; the shade does not change. The swatches automatically use whichever of black or white has the higher WCAG contrast ratio against each background. This helps you read the code, but it does not certify that every small text and font configuration in a design meets accessibility rules.

Random color versus a harmonious palette

Independent colors are excellent for exploratory sketches, testing interface states, assigning arbitrary markers or deciding a game color. They may clash when used together as a finished brand identity. For a coordinated set, use the color palette generator, which arranges colors by hue harmony and lets you start from a chosen color or photo. The color picker is better if you already know the shade and want to adjust it precisely.

No generated colors, preferences or copied values are uploaded. If you regenerate without locking, the previous unlocked set is discarded. Repeated colors are possible, as with any genuine random selection. The tools show standard opaque sRGB values, not transparency or print CMYK conversions.

Frequently asked questions

Can I copy just one random HEX color?

Yes. Choose one color and press HEX on its swatch. You can also generate several swatches and copy only the ones you like.

Are the random colors really equally likely?

In Any RGB color mode, yes: the three channels are drawn independently with unbiased browser randomness. Pastel, vivid, light and dark deliberately restrict the possible shades.

Can I keep colors when generating another set?

Yes. Select Lock under any swatch, then press Generate colors. Locked colors stay in place. Unlock one to draw a new color there.

What is the difference between HEX, RGB and HSL?

They encode the same opaque color in different ways. HEX uses hexadecimal channel pairs, RGB uses decimal channel numbers, and HSL uses hue, saturation and lightness.

Does this upload anything?

No. Colors are generated by browser APIs on your device. The tool has no need to send colors or personal information to a server.

Embed this calculator on your website

Free for any website or blog. Paste this code where you want the calculator to appear:

All free calculator widgets

Last updated: October 18, 2026

Menu

Categories

Finance Calculators30 calculatorsBusiness & Shopping Calculators9 calculatorsHealth & Fitness Calculators13 calculatorsMath & School Calculators24 calculatorsDate & Time Calculators20 calculatorsHoliday Countdowns17 calculatorsEveryday Tools53 calculatorsMic, Camera & Sound Tools12 calculatorsDeveloper Tools10 calculatorsImage & PDF Tools21 calculators

CalcWorthy

AboutContactPrivacy PolicyTerms of Use

Language

Language
EnglishEnglishالعربيةArabicবাংলাBanglaDeutschGermanEspañolSpanishفارسیPersianFrançaisFrenchעבריתHebrewहिन्दीHindiBahasa IndonesiaIndonesianItalianoItalian日本語Japanese한국어KoreanBahasa MelayuMalayNederlandsDutchPolskiPolishPortuguêsPortugueseРусскийRussianไทยThaiTürkçeTurkishУкраїнськаUkrainianاردوUrduTiếng ViệtVietnamese简体中文Simplified Chinese