Home › Image Tools › Random Color Generator

Random Color Generator

Need a fresh color fast? Generate one random color or a batch of up to 100, steer them with hue, saturation and lightness ranges, lock the ones you love and copy them as HEX, RGB, HSL or OKLCH.

Last updated:

0°–360°
Saturation
Lightness

Click a color to copy it · 🔒 keeps a color when you generate again · press Space to generate.

Recently generated

Advertisement
Advertisement

How to use the Random Color Generator

  1. Choose how many colors you want and a style such as Pastel or Vivid.
  2. Optionally lock a hue range with the sliders or a preset like Blues or Greens, and fine-tune saturation and lightness.
  3. Press Generate colors (or the Space bar) to roll new colors.
  4. Lock favorites with the padlock so they stay when you generate again.
  5. Click a color to copy it, or use Copy all and Download to export the whole set.

Style presets explained

StyleSaturationLightnessGood for
Any color0–100%0–100%Pure randomness, inspiration
Vivid / bright85–100%45–60%Logos, game sprites, call-to-action buttons
Pastel55–90%80–90%Baby showers, soft backgrounds, stickers
Light40–85%70–88%Card backgrounds, highlights, charts
Dark35–85%12–30%Dark themes, text colors, deep accents
Muted / earthy12–40%28–60%Natural, vintage and minimalist designs
Grayscale0%5–95%Neutral UI grays

Hue ranges on the color wheel

Hue is an angle from 0° to 360°. Roughly: 0° red, 30° orange, 60° yellow, 120° green, 180° cyan, 240° blue, 270° purple, 300° magenta, and back to red at 360°. The quick presets use these ranges: Reds 345°–15°, Oranges 15°–45°, Yellows 45°–70°, Greens 75°–165°, Teals 165°–200°, Blues 200°–250°, Purples 250°–300° and Pinks 300°–345°.

Example: with the hue locked to 200°–250° and the Vivid style, a roll might give hsl(222, 92%, 51%), which converts to RGB as (15, 84, 245) or #0f54f5.

Ideas for using random colors

  • Break a creative block: generate eight colors, lock the two you like and reroll the rest until a palette emerges.
  • Placeholder avatars and tags: use the Light or Pastel style so dark text stays readable on every color.
  • Data visualization tests: generate many vivid colors to stress-test a chart legend.
  • Games and classroom activities: pick a random color and ask players to name it or find something that matches.
  • Design practice: force yourself to design a poster with three random colors.

Frequently asked questions

How are the random colors generated?

Each color gets a random hue, saturation and lightness inside the ranges you set, using the browser's cryptographic random number generator. The HSL values are then converted to an exact RGB and HEX code.

How many different HEX colors are there?

A six-digit HEX code has 256 values for each of red, green and blue, which gives 256 × 256 × 256 = 16,777,216 possible colors. In Any color mode every one of them can come up.

How do I get only pastel colors?

Choose the Pastel style. It keeps saturation between 55% and 90% and lightness between 80% and 90%, which produces soft, light tones. Combine it with a hue range such as Pinks or Blues for a themed set.

What does Lock hue range do?

It limits the hue of new colors to the range between From hue and To hue on the color wheel (0° red, 120° green, 240° blue). If From is larger than To, the range wraps through red, so 330° to 30° gives reds and magentas.

Can I keep some colors and reroll the rest?

Yes. Click the padlock on any color to lock it. The next time you press Generate colors only the unlocked colors change, which makes it easy to build a palette step by step.

Are the colors saved?

Your settings, the current colors and a history of the last 60 generated colors are stored in your browser only, so they are still there when you come back. Use Clear history to remove them.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Color Palette GeneratorGenerate beautiful color palettes and export them.Color Name FinderFind the closest color name for any HEX or RGB color.HEX to RGBConvert HEX colors to RGB and other formats.Color Shades GeneratorTurn one HEX color into a 50-950 scale plus tints, shades and tones, ready to export.Bubble Shooter GameAim, bounce and match 3 or more colored bubbles to pop them before the ceiling comes down.Color Temperature to RGBConvert a color temperature in kelvin (1000-40000 K) to RGB and HEX with a live swatch.Mastermind GameCrack the secret 4-color code in 10 tries using black and white feedback pegs.Mesh Gradient GeneratorDrag color points to make smooth mesh and aurora gradients with grain, then export PNG or CSS.RGB to HEXConvert RGB to HEX with sliders, live swatch and one-click copy.HEX to HSLConvert HEX colors to HSL and back with interactive sliders.RGB to CMYK ConverterConvert RGB and HEX colors to CMYK for print, and back.Color Contrast CheckerCheck WCAG contrast ratios and find accessible text colors.Pantone to HEXLook up approximate HEX, RGB and CMYK values for Pantone colors.Color Blindness SimulatorSee any image as people with protanopia, deuteranopia, tritanopia or achromatopsia see itImage Color PickerPick any pixel colour from an image and get HEX, RGB, HSL plus a paletteTailwind Color GeneratorTurn one color into a full Tailwind 50–950 shade scale and export the config or CSS.Color MixerMix two colors in sRGB, linear, OKLab or OKLCH, or blend them with Photoshop-style modes.Color WheelFind complementary, triadic, analogous and other color harmonies on an interactive wheel.Color PickerPick any color and get HEX, RGB, HSL, HSV and CMYK codes, shades and a screen eyedropper.HTML Color CodesAll 140 HTML color names with HEX and RGB codes, plus the 216 web-safe colors. Click to copy.Color Palette from ImageExtract the main colors of any photo as HEX codes, CSS variables and a palette PNG.Replace Color in ImageClick a color in a picture and swap it for a new color or transparency, keeping the shading.CMYK to RGBConvert CMYK percentages to RGB and HEX color codes with sliders and a live preview.HSL to HEXConvert HSL and HSLA colors to HEX and RGB with sliders and a live preview.HEX to RGBAConvert HEX color codes to CSS rgba() with an opacity slider and one-click copy.RGBA to HEXConvert rgba() colors to 8-digit HEX, or flatten transparency onto any background.HEX to CMYKConvert HEX color codes to CMYK percentages for print, with a live preview.HEX to PantoneFind the 5 closest Pantone-style solid coated colors for any HEX or RGB, ranked by Delta E.OKLCH Color ConverterConvert HEX, RGB and HSL to OKLCH, OKLab, Lab and LCH with sRGB and P3 gamut checks.RAL to HEXLook up RAL Classic codes as HEX, RGB and CMYK, search by name or find the nearest RAL.Color Code ConverterConvert a color between HEX, RGB, HSL, HSV, CMYK, LAB, LCH and OKLCH with a live swatch.Room Paint Color VisualizerUpload a room photo, select the walls and preview any paint color or HEX with real lighting.Photo to Pop ArtMake Warhol-style pop art from a photo: posterized color tiles in 1, 4 or 9 grids with custom palettes.Screen Color PickerPick any pixel color from anywhere on your screen and copy it as HEX, RGB or HSL.Solid Color Image GeneratorMake a plain single-color or transparent image in any size, like 1920x1080, as PNG or JPG.White Balance CorrectorFix color casts: click a neutral gray point or use auto gray world, then fine-tune temperature and tint.CMYK to HEXConvert CMYK percentages to a HEX color code and RGB, with a live swatch and shades.Photo Color MatchCopy the color grading of a reference photo onto your image (Reinhard color transfer).Underwater Photo Color CorrectionRestore lost reds and remove the blue or green cast from underwater photos by depth.
See all 38 Color Tools →