Skip to content
ToolZone

Random Palette Generator

Generate a random set of colors, with the option to lock specific swatches you like while regenerating the rest, for design exploration.

Runs in your browser. Nothing you enter or upload leaves your device.

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the Random Palette Generator

Random Palette Generator fills a row of 3 to 8 swatches with random colors. When one catches your eye, lock it and generate again; only the unlocked swatches change. It's a playful way to discover combinations that rule-based tools wouldn't suggest.

How it works

Each unlocked swatch gets a random whole number between 0 and 16,777,214, converted to a six-digit hexadecimal code. That means every color in the RGB cube is roughly equally likely, from near-black to near-white and everything between. There are no harmony rules, so palettes can be bold, clashing or surprisingly elegant.

When you press Generate, locked swatches are skipped and keep their color. Changing the palette size adds new random swatches at the end, or removes swatches from the end, including locked ones. The text on each swatch uses a brightness formula (0.299 R + 0.587 G + 0.114 B) to choose dark or white text so the code stays readable.

How to use

  1. 1

    Pick a palette size from 3 to 8 using the numbered buttons.

  2. 2

    Press Generate to get new random colors.

  3. 3

    Click the lock icon at the top of any swatch you want to keep.

  4. 4

    Press Generate again to replace only the unlocked swatches.

  5. 5

    Copy single HEX codes, the whole list, or CSS variables. Copy link shares the exact palette.

Worked examples

Building around a keeper

A designer gets a deep teal they like in the second swatch.

Input
5 swatches, swatch 2 locked
Result
After Generate, swatch 2 keeps its teal while swatches 1, 3, 4 and 5 show new colors

Keep locking colors that work with the teal until all five are set.

Copying a finished palette

Saving a 4-color palette into a notes app.

Input
Copy all as comma-separated list
Result
Text in the form #1F6F78, #E8C547, #D45D4C, #F2EDE4

The colors shown are illustrative; your palette will be different each time.

Limitations
Colors are purely random with no harmony, contrast or accessibility rules applied. The palette is kept in the page link, so bookmark it to keep it; locks are not saved. Uses the browser's Math.random, which is fine for design but not a cryptographic source.
Assumptions
You want inspiration or quick distinct colors rather than a rule-based scheme.
Privacy
Colors are generated in your browser, and nothing is sent to a server or stored.

Frequently asked questions

How does locking a swatch work?+

Click the lock icon on a swatch. Locked swatches keep their color when you press Generate, and only the unlocked ones change.

Is this useful for finding color combinations I wouldn't think of?+

Yes. Because there are no harmony rules, it can surface unexpected pairings that a rule-based generator would never produce.

How many colors can a palette have?+

Between 3 and 8. Use the numbered buttons above the palette to change the size.

Are my palettes saved?+

The current palette is always in the page link, so bookmarking or sharing the page keeps it.

Can I start from a specific color?+

Not directly. For a palette built from a chosen base color, use the Color Palette Generator.

Related tools