Random Generators

Random Color Generator

Generate random sRGB colors for design experiments, coding exercises, or visual prompts. Every six-digit hex color has the same chance. Swatches show both CSS hex and RGB notation, with readable black or white labels.

Free online tool

Loading tool…

Explore random sRGB colors

Uniform sampling across all 16,777,216 24-bit RGB colors. Colors are independent; no matching palette or accessible pairing is implied.

Color swatches

Your swatches and copyable color values will appear here.

Inputs and generated results are processed in your browser. These tools do not upload them or persist them in local storage. Copying or downloading creates a record you control.

GET STARTED

How to use the Random Color Generator

  1. 01

    Choose 1–100 colors and decide whether each batch must contain distinct hex values.

  2. 02

    Generate swatches and inspect the hex and RGB values.

  3. 03

    Copy or download the values, or expand CSS custom properties for ready-to-use variable declarations.

Examples

Create placeholder colors

Generate six unique colors for a prototype. The result is a set of independent colors; review and adjust combinations before using them together.

Copy a CSS value

A result of #12A4F0 is the same sRGB color as rgb(18, 164, 240). Copy the values into any CSS property that accepts a color.

Uniform in RGB code space

There are 256 choices for each of red, green, and blue, producing 16,777,216 colors. The generator samples that integer space uniformly. This does not create equal perceptual steps or guarantee equal amounts of every named hue.

Readable labels are separate from palette accessibility

Each swatch chooses black or white text from its relative luminance. That helps read the swatch itself. It does not certify that two generated colors have enough contrast when paired in your own interface; test the actual foreground, background, size, and use.

Independent colors rather than a coordinated palette

The tool does not enforce harmony, color-blind distinguishability, printing gamut, or brand rules. Unique mode prevents identical RGB codes within the current batch, but visually similar colors are still possible. Every new batch can repeat colors from earlier batches.

Common questions

Do hex colors include transparency?

No. Results use six-digit #RRGGBB notation with opaque RGB channels.

Can I get the same color twice?

Not within a batch when uniqueness is enabled. It can appear again in a later batch.

Are these print-ready CMYK colors?

No. These are sRGB values intended for digital workflows. Print conversion depends on a specific color profile and printing process.

Can I use the CSS variables directly?

Yes. Expand CSS custom properties, copy the declarations, and refer to them with var(--color-1), var(--color-2), and so on.

Sources & references