Random Color Palette Generator

Press Spacebar to shuffle 2–10 harmonious colors, lock favorites, check WCAG contrast, and export HEX, CSS, Tailwind OKLCH, or PNG.

5 colors
Tip: Press Spacebar to generate new colors, or click any HEX code to copy.
Export Palette
Live UI Preview & Saved
Preview Card Readable Heading & Contrast Check See how your selected palette performs across surface, text, and button states. Primary Action

Use this random color palette generator to build balanced 2–10 color schemes directly in your browser without creating an account. Press the Spacebar or click Generate Palette to explore new combinations, lock individual swatches you want to keep, reorder columns, check WCAG contrast ratios against light and dark text, and export production-ready HEX, CSS custom properties, Tailwind v4 OKLCH tokens, SVG, or PNG files.

How This Random Color Palette Generator Works

Most online tools restrict free users to five fixed swatches. On RandomPalette, you can add or remove columns anytime from 2 to 10 colors, making the workspace equally practical for minimal two-tone brand marks, five-color UI systems, and ten-step data visualization scales.

  1. Generate in one keystroke: Hit Space anywhere outside an input field to shuffle every unlocked swatch. Use Undo and Redo (up to 30 steps) whenever you want to step back to an earlier combination.
  2. Lock and fine-tune: Click Lock on any swatch that works, then keep generating around it. Click any HEX label to copy it immediately, drag-free reorder swatches with the arrow buttons, or type a custom HEX value in the swatch editor.
  3. Guide randomness with harmony modes: Switch the mode selector between Any (Random), Analogous, Complementary, Monochromatic, Pastel, Vibrant, Dark / Moody, Earth / Warm, and High Contrast.
  4. Save or share instantly: Every change updates the URL hash (#hex1-hex2-...), so clicking Copy Link shares the exact palette with teammates. Click Save to keep favorite palettes inside your browser's localStorage.

If you already have a photo or brand color in mind, switch to our Color Palette Generator from Image to sample colors directly from artwork, or use our Color Palette Generator from Hex to expand a single seed shade into structured harmonies.

Example Random Color Palettes (HEX & OKLCH)

Below are three real palettes produced by the generator, paired with their perceptual OKLCH values so you can see how lightness (L), chroma (C), and hue (H) work together across neutral surfaces and accent roles.

Palette Theme Role HEX OKLCH Value Recommended Use
Crisp SaaS Surface #F8FAFC oklch(98.4% 0.003 247.9) Page background & canvas
Crisp SaaS Ink #0F172A oklch(20.8% 0.042 265.8) Primary headings & body text
Crisp SaaS Primary #2563EB oklch(54.6% 0.215 262.9) Primary buttons & active links
Crisp SaaS Accent #14B8A6 oklch(70.4% 0.140 182.5) Status badges & secondary highlights
Warm Editorial Cream #FEF3C7 oklch(96.2% 0.059 95.6) Hero cards & callout panels
Warm Editorial Ochre #B45309 oklch(55.5% 0.146 49.0) Borders & subtle icons
Warm Editorial Espresso #78350F oklch(37.9% 0.095 45.2) Display headings & warm ink
Vibrant Studio Rose #EC4899 oklch(65.6% 0.212 354.3) Feature tags & illustration accents
Vibrant Studio Indigo #4F46E5 oklch(51.1% 0.229 277.1) Navigation bars & CTAs

When applying any generated scheme to a real website or product interface, follow the 60-30-10 color balance rule: dedicate roughly 60% of the viewport to a calm neutral background surface, 30% to secondary cards, borders, and dark typography, and 10% to your primary action color or status highlights. Using the 2–10 swatch controls above, lock one light background, one deep ink shade, and one primary accent first, then press Spacebar to test supporting shades until the hierarchy feels effortless.

Built-In WCAG Contrast & Colorblind Checks

Attractive color combinations still fail real users if text contrast is too low or adjacent hues merge under color vision deficiency. Every swatch card automatically calculates two WCAG 2.1 contrast ratios:

  • W ratio: Contrast against pure white (#FFFFFF).
  • B ratio: Contrast against deep slate (#0F172A).
  • AA / AAA badge: Indicates whether at least one pairing meets standard body-text readability (4.5:1 for AA, 7.0:1 for AAA) or large-text thresholds (Large).

To verify distinguishability, switch the Vision selector from Normal to Protanopia, Deuteranopia, Tritanopia, or Achromatopsia. The swatches update in real time using linear RGB color-vision matrices, while the live UI Preview Card lets you inspect how background, text, and button accents look together before exporting.

Export Formats for Design & Code

Once your palette is ready, choose the export tab that matches your workflow:

  • HEX: Comma-separated uppercase HEX codes ready to paste into Figma, Illustrator, or design briefs.
  • CSS: Clean :root custom properties (--color-1 through --color-10) for vanilla stylesheets.
  • Tailwind OKLCH: Ready-to-paste Tailwind CSS v4 @theme block with exact perceptual oklch() values calculated from sRGB.
  • SVG & PNG: Download a scalable vector swatch sheet or a 1600×900 high-resolution PNG card labeled with every HEX code for client presentations and mood boards.

All color math, contrast checks, and file exports execute locally on your device. Read our About page for technical details or check our Privacy Policy for data handling specifics.

Frequently Asked Questions

How do I generate a random color palette with more than 5 colors?

Press the Spacebar anywhere outside text inputs or click the Generate Palette button. Use the + and - buttons to choose anywhere from 2 to 10 colors, and click Lock on any swatch you want to keep before shuffling again.

Can I use these generated color palettes for commercial projects?

Yes. Every color palette generated on RandomPalette is free to use in personal and commercial websites, apps, branding, and print projects without attribution. See our Terms of Service for details.

How do the WCAG contrast ratios on each swatch work?

Every swatch displays two WCAG 2.1 contrast ratios: W (against white #FFFFFF) and B (against dark slate #0F172A). A ratio of 4.5:1 or higher meets AA for normal body text, and 7.0:1 or higher meets AAA.

How do I export a palette for Tailwind CSS v4?

Click the Tailwind OKLCH tab in the Export Palette panel. The tool converts each sRGB HEX color through linear RGB and OKLab into an oklch(L% C H) token wrapped inside a Tailwind v4 @theme block.

Do I need an account to save or share a palette?

No. Clicking Save stores palettes inside your own browser's localStorage, and clicking Copy Link encodes the HEX values into the URL hash so nothing is sent to a server.

Can I generate a palette from an image or an existing HEX code?

You can switch to our Color Palette Generator from Image tool to extract colors from photos, or use Color Palette Generator from Hex to build analogous and complementary schemes from a single brand color.