Random Color Generator

Generate random colors and get each one's HEX, RGB, and HSL values ready to copy. Free, and entirely in-browser. Random color exploration is a legitimate design technique: when a palette feels stale, a few random draws break the habit loop of picking the same blues, and seeing each color in three notations at once means the value you copy matches the format your CSS, design tool, or framework expects. The table shows the same color expressed in each notation, so the formats are easy to map to each other.

One color in three notations

NotationExample
HEX#7C3AED
RGBrgb(124, 58, 237)
HSLhsl(262, 83%, 58%)

When to use it

  1. Break out of a color rut by sampling random hues for inspiration.
  2. Grab a quick placeholder color with its HEX code during prototyping.
  3. Get the RGB or HSL equivalent of a generated color without converting by hand.
  4. Build a quick mood board of candidate colors for a new project.

How to Use

  1. Click 'Generate' or press the spacebar to generate a new set of 5 random colors.
  2. Click the lock icon on any color swatch to keep it when regenerating.
  3. Click a color swatch to copy its HEX, RGB, or HSL value to your clipboard.
  4. Use the color picker to manually set a specific color.
  5. Copy the full palette as a CSS variables snippet for use in your project.

Features

  1. Generate 5 random colors with a single click or spacebar press
  2. Lock individual colors to keep them while regenerating the rest
  3. Copy colors in HEX, RGB, or HSL format
  4. Manual color picker for precise color selection
  5. Export the full palette as CSS custom properties
  6. 100% client-side — no data leaves your browser

FAQs

How are colors generated?

Colors are generated using your browser's built-in random number generator, producing truly random RGB values that are then converted to HEX and HSL formats.

What color formats are supported?

Each color is displayed in HEX, RGB, and HSL formats. You can click to copy any format to your clipboard.

Can I lock colors I like?

Yes! Click the lock icon on any color to keep it when you regenerate. Only unlocked colors will change.

Technical Details

Color generation operates in multiple color spaces depending on your requirements. Pure random RGB colors are created by generating three independent bytes (0-255) for red, green, and blue channels using crypto.getRandomValues() for uniform distribution. For visually pleasing palettes, the generator works in HSL space where hue is randomized across the 360° spectrum while saturation and lightness are constrained to perceptually balanced ranges (typically 60-90% saturation, 45-65% lightness). The Golden Ratio method spaces hues using φ ≈ 0.618 to ensure colors are aesthetically distinct. Generated colors are displayed as swatches with HEX, RGB, and HSL notations, and palette exports support CSS variables, JSON, or SCSS format.

From the Blog

  • CSS Gradient Generator — Free Visual Builder

Generator Tools

Generator Tools

  • Gradient Generator
  • OKLCH Color Palette Generator
  • QR Code Generator
  • Barcode Generator
  • WiFi QR Code Generator
  • Password Generator
  • Certificate Generator
  • Receipt Generator