Our networkLegalCost.usWhat will your legal case cost?Official formulas for all 50 states. Free, no signup.Check your state
Fun · Randomizer

Random Color

Generate random colors instantly. Get the HEX, RGB, and HSL values for each color. Filter by hue, saturation, or brightness. Generate a full palette of random colors. Click any value to copy it.

Last updated

HEX RGB HSL
Palette Mode
Hue & Tone Filters
Click to Copy
Random Color
Free · Instant · No signup
Click to copy HEX

Click Generate to see color values.

Understanding Color Formats

A 24-bit screen color has 16,777,216 possible values, 256 levels each of red, green and blue, written as a six-digit HEX code such as #1980E6. This generator picks a random hue, saturation and lightness inside the tone and hue you choose, then shows the HEX, RGB and HSL values and the contrast ratio against white.

HEX (#RRGGBB) is the standard for web design. RGB (Red, Green, Blue, 0-255 each) is how screens create color. HSL (Hue 0-360deg, Saturation 0-100%, Lightness 0-100%) is the most intuitive for designers because you can adjust brightness and saturation independently from the hue.

Hue (H)

The pure color angle on the color wheel: 0=red, 120=green, 240=blue, 360=red again.

Saturation (S)

100% = vivid pure color. 0% = pure gray. Low saturation gives neutral, muted tones.

What Each Tone Setting Picks

The hue is chosen evenly around the color wheel (or within the hue filter you pick). Saturation and lightness are then chosen evenly within these limits:

ToneSaturationLightness
Any color20% to 100%20% to 85%
Light / Pastel30% to 70%70% to 95%
Dark / Deep40% to 90%10% to 40%
Vivid / Saturated75% to 100%40% to 65%
Neutral / Muted5% to 30%30% to 80%

Even "Any color" skips near-black, near-white and plain grays, because those rarely make useful picks. For a pure gray, enter an HSL value with 0% saturation in the color converter. To build tints and shades of a color you like, open it in the color picker.

HSL to HEX: Worked Examples

Take hsl(210, 80%, 50%). The HSL formula gives red 25, green 128 and blue 230. In hexadecimal 25 is 19, 128 is 80 and 230 is E6, so the color is #1980E6, a clear medium blue.

HSLRGBHEXContrast on white
hsl(0, 100%, 50%)255, 0, 0#FF00004.00:1
hsl(60, 100%, 50%)255, 255, 0#FFFF001.07:1
hsl(120, 100%, 25%)0, 128, 0#0080005.14:1
hsl(210, 80%, 50%)25, 128, 230#1980E63.98:1
hsl(270, 50%, 40%)102, 51, 153#6633998.41:1

Notice that pure red and pure yellow share 100% saturation and 50% lightness, yet yellow is almost invisible on white. HSL lightness is not the same as how bright a color looks.

Contrast Ratings Explained

The contrast row compares the color with a white background using the WCAG 2 formula, from 1:1 (no contrast) to 21:1 (black on white).

  • AAA pass: 7:1 or more, readable for almost everyone.
  • AA pass: 4.5:1 or more, the usual minimum for body text.
  • AA large text only: 3:1 or more, acceptable for text at least 18 point, or 14 point bold.
  • Fail: under 3:1, fine as a background or accent but not for text on white.

How random is it?

Each value comes from Math.random, the browser's built-in pseudorandom generator, which is plenty for design inspiration. The palette mode simply repeats the draw, so colors in a 5 or 10 color palette are independent and can land close together.

Method and sources. HSL to RGB uses the CSS Color Module Level 4 conversion; contrast uses WCAG 2 relative luminance, (L1 + 0.05) ÷ (L2 + 0.05). Tone limits are read from the page code. Every value in the tables was computed in node with the same functions the page runs. Thresholds: W3C Web Content Accessibility Guidelines 2.2, success criteria 1.4.3 and 1.4.6.

Frequently Asked Questions

HEX and RGB represent the same information differently. #FF5733 in HEX = rgb(255,87,51) in RGB. HEX is preferred for CSS and design tools; RGB is used in programming when you need to manipulate individual channels.

HSL stands for Hue, Saturation, Lightness. Hue is the angle on the color wheel (0-360). Saturation is how vivid vs. gray (0-100%). Lightness is how dark vs. bright (0-100%). HSL is more intuitive than RGB for creating color variations: change only the L value to get darker/lighter versions of the same hue.

A vivid or saturated color has high saturation (80-100%) and medium lightness (40-60%). Reducing saturation gives pastel or muted versions. Reducing lightness gives darker, richer versions.

Contrast ratio measures how distinguishable a color is against a background. WCAG accessibility guidelines require minimum 4.5:1 contrast ratio for normal text on web pages. Low contrast makes text hard to read, especially for people with visual impairments.

Start with a primary hue, then create variations by adjusting lightness and saturation. A typical palette has 1-2 accent colors, a neutral scale (grays), and background/surface colors. Use this generator to explore random starting points for inspiration.

Each hue name corresponds to an angle range on the HSL color wheel: reds (0-30deg and 330-360deg), oranges (30-60deg), yellows (60-90deg), greens (90-150deg), cyans (150-210deg), blues (210-270deg), purples (270-300deg), pinks (300-330deg).

CSS has 148 named colors from "aliceblue" to "yellowgreen". Most random colors fall between those names, so the "Plain name" row describes the color in words instead, such as "dark muted blue", using the hue filter ranges plus lightness and saturation. For code, paste the HEX, RGB or HSL value.

Yes. All generated colors are freely usable. HEX and RGB values can be pasted directly into CSS, design tools like Figma or Sketch, or any code editor.

Random colors break the habit of always reaching for the same palette. They can inspire unexpected combinations, serve as starting points for exploration, or be used as placeholder content in prototypes and mockups.

Up to 10 in palette mode. Each generates a new random color following the same filters. Click any swatch to see its detailed values.

A six-digit HEX code can describe 16,777,216 colors: 256 values for each of red, green and blue, and 256 × 256 × 256 = 16,777,216. The short three-digit form such as #F80 covers only 4,096 of them, because each digit is doubled (#FF8800).

Light colors and yellows reflect almost as much light as white, so text in those colors is hard to read on a white page. Pure yellow #FFFF00 scores just 1.07:1, while WCAG asks for 4.5:1 for normal text. Pick the Dark / Deep tone if you need text colors that pass.