Random Color Generator

Discover Colors and Create Beautiful Palettes

Generate random colors from the full RGB spectrum, discover named shades, and create beautiful color palettes. Explore HEX, RGB, HSL, and more—all in one free online tool.

RGB Space: 16,777,216 colors
Named Catalog: 0 records (0 HEX)
RNG Engine: CSPRNG

Primary Color Preview

Press Generate Random Color or hit Space outside text fields.

0 / 0
Exact Catalog Match Category: Blue
#4169E1
RoyalBlue (W3C)
rgb(65, 105, 225) • hsl(225°, 73%, 57%)
Catalog Match Status
RoyalBlue (W3C)
Closest Named Color (CIEDE2000)
Exact match (ΔE₀₀ = 0.00)
Catalog Aliases
Royal Blue
Algorithmic Description
Approximate: Vivid medium-light blue

Color-Generation Mode

Choose full 16.7M RGB coverage or genuine mathematical constraints.

Full RGB Spectrum Active: Generates unbiased random integers for Red (0–255), Green (0–255), and Blue (0–255), covering all 16,777,216 standard 24-bit RGB combinations.

Color Format Conversions

All values derive deterministically from the canonical RGB state.

HEX (6-Digit)
#4169E1
RGB (0–255)
rgb(65, 105, 225)
RGBA (Alpha preserved)
rgba(65, 105, 225, 1)
HSL (Hue, Sat, Lightness)
hsl(225, 73%, 57%)
HSV / HSB (Brightness)
hsv(225, 71%, 88%)
CMYK (Unprofiled)*
cmyk(71%, 53%, 0%, 12%)
CIELAB (D65 sRGB)
lab(47.9 19.3 -64.1)
OKLCH (Perceptual)
oklch(55.9% 0.198 262.9deg)

*Note on CMYK: Mathematical RGB-to-CMYK conversion depends on device assumptions and is not equivalent to converting through a press-specific ICC output profile.

Multi-Color Palette & Harmony Generator

Build 2 to 24 color palettes using random generation, mathematical harmonies, or local style rules. Lock any swatch to preserve its exact HEX.

Random Palette Mode: Generates each unlocked slot using your selected Color-Generation Mode while respecting locked swatches.
Style-Inspired Local Palette Generator (Rule-Based Seeds — Click to Generate Variations): Local algorithmic rules (no external AI API required)

Complete Color Editor & Visual Picker

Fine-tune the active color via 2D HSV/HSL canvas, HEX input, RGB/HSL sliders, or native picker.

2D Saturation / Brightness Visual Area (Drag or use Arrow keys) S: 71%, V: 88%
Hue Spectrum Bar (0°–360°) Hue: 225°

WCAG Contrast Checker & Accessibility

Real sRGB relative luminance & WCAG 2.1 contrast ratio verification.

Rel. Luminance L = 1.0000
Rel. Luminance L = 0.1441
Computed Contrast Ratio
5.41 : 1
Passes WCAG AA Normal Text
Formula: (L₁ + 0.05) / (L₂ + 0.05)
WCAG AA Normal
Requires ≥ 4.5 : 1
PASS (5.41)
WCAG AA Large / UI
Requires ≥ 3.0 : 1
PASS (5.41)
WCAG AAA Normal
Requires ≥ 7.0 : 1
FAIL (5.41)
WCAG AAA Large
Requires ≥ 4.5 : 1
PASS (5.41)

Sample Heading Text (Large Text ≥ 18pt / 14pt Bold)

Sample body paragraph text rendered using your selected foreground and background colors. Verify legibility across regular copy, headings, and interactive controls.

Interactive Button Label

Note: Contrast ratio applies only to the selected foreground and background pair and does not by itself certify full website accessibility (such as keyboard navigation, focus states, or font sizing).

Searchable Named-Color Library

Search by name (e.g. RoyalBlue, Emerald, Coral, Charcoal), HEX (#4169E1 or #F00), or RGB (255, 0, 0).

Filter by Algorithmic Color Category (derived from HSL & RGB channel relationships; achromatic shades classified separately):
Showing 1–24 of 1109 named colors Dataset: Embedded W3C Standard + Comprehensive Descriptive Shade Catalog
Page 1 of 47
Tip: Click any swatch to inspect it in the main generator, or click + Palette to append it.

Export Palette & Code Snippets

Generate real downloadable files and copyable snippets from your current palette.

Import Colors & Palettes

Import from plain-text HEX lists, CSS variables, JSON palettes, or CSV files.

Saved Palettes & Recent Session Colors

In-memory by default for privacy. Enable optional local browser storage if you want saved palettes to persist across reloads.

Recently Generated & Selected Colors (0)
No colors generated in this session yet. Click "Generate Random Color" above to start tracking history.
Saved Palettes (0)

Understanding Digital Color Spaces, Harmonies & Accessibility

Essential reference for web designers, UI engineers, digital artists, and developers.

What Is a Random Color Generator?

A random color generator selects colors programmatically from the complete 24-bit RGB color space or within user-defined hue, saturation, and lightness ranges. Using cryptographic randomness (crypto.getRandomValues), it ensures unbiased exploration across every possible digital shade.

What Is a HEX Color?

A HEX color code represents Red, Green, and Blue intensity channels using base-16 hexadecimal digits in the format #RRGGBB. Each pair ranges from 00 (0) to FF (255), providing a compact six-character string widely used in HTML, CSS, and SVG design.

What Is RGB & How Many RGB Colors Exist?

RGB is an additive color model combining Red, Green, and Blue light, where each channel ranges from 0 to 255. Because each of the three channels has 256 possible integer values, standard 24-bit RGB supports 256 × 256 × 256 = 16,777,216 unique colors. Named color catalogs represent only a tiny fraction of this space.

What Is HSL & HSV?

HSL represents color by Hue (0°–360° color wheel angle), Saturation (0% gray to 100% vivid), and Lightness (0% black, 50% pure hue, 100% white). HSV (or HSB) uses Value/Brightness where 100% represents maximum light intensity under saturated or white light.

What Is a Color Palette & Color Harmony?

A color palette is a coordinated collection of colors chosen for a user interface, brand system, or illustration. Color harmony schemes—such as complementary (180° opposite), analogous (adjacent hues), triadic (120° apart), split-complementary, and tetradic—use geometric relationships on the hue wheel to create balanced combinations.

What Is Contrast Ratio & Is This Tool Free?

Contrast ratio measures the difference in relative luminance between foreground text and background surfaces from 1:1 to 21:1 under WCAG 2.1 guidelines (4.5:1 for AA normal text, 7:1 for AAA). This Random Color Generator is 100% free, runs locally in your browser without accounts or API keys, and never transmits your palettes externally.

Frequently Asked Questions (FAQ)

Answers about full RGB generation, named-color matching, harmonies, exports, and privacy.

1. What does a random color generator do?
It programmatically generates RGB color channel values using an unbiased random number generator, renders a live visual swatch, identifies exact or closest named colors, and computes corresponding HEX, RGB, RGBA, HSL, HSV, CMYK, CIELAB, and OKLCH representations.
2. How many colors can this tool generate?
In unrestricted mode, this generator covers the entire standard 24-bit RGB color space of 16,777,216 possible combinations (Red 0–255, Green 0–255, Blue 0–255). The named-color library is a separate lookup catalog and never limits the generator's mathematical output range.
3. Does every generated color have an official name?
No. Out of 16,777,216 RGB colors, only a few hundred have official W3C/CSS names and several thousand have common descriptive names. When a generated HEX has no exact match in the catalog, the tool honestly labels it as a custom RGB color and calculates its closest perceptual named match using the CIEDE2000 (ΔE₀₀) formula in CIELAB space.
4. Can I search named colors?
Yes. The Searchable Named-Color Library lets you search across over 1,100 embedded W3C standard and descriptive color names by partial name, alias, 6-digit or 3-digit HEX code, or RGB triplet, and filter by 16 algorithmic color categories or sort by Hue, Lightness, Saturation, and RGB channels.
5. What is the difference between HEX and RGB?
Both represent the exact same red, green, and blue channels of a 24-bit color. RGB writes the three channel intensities in base-10 decimal notation (e.g., rgb(65, 105, 225)), whereas HEX encodes those same three bytes in base-16 hexadecimal notation (e.g., #4169E1).
6. Can I generate multiple colors at once?
Yes. Using the Multi-Color Palette Studio, you can generate between 2 and 24 colors simultaneously, adjust the palette size at any time, and add or remove individual color slots.
7. Can I create complementary or triadic palettes?
Yes. The Color Harmony Engine calculates 11 true geometric and tonal schemes from your active base color: Complementary (180°), Analogous (adjustable spacing), Triadic (120°), Split-Complementary, Tetradic, Square (90°), Monochromatic, Shades, Tints, Tones, and Custom Step Harmonies.
8. Can I lock a color while generating the rest?
Yes. Every swatch card in the palette includes a Lock toggle. Locked colors keep their exact canonical RGB/HEX values, names, and positions unchanged when you click Regenerate Unlocked or switch harmony modes.
9. Can I edit the generated color?
Yes. You can edit the active color using the interactive 2D Saturation/Brightness canvas and Hue bar, validated HEX input (#RRGGBB or #RGB), individual Red/Green/Blue (0–255) sliders, Hue/Saturation/Lightness sliders, Alpha slider, or your browser's native color picker.
10. Can I export a palette?
Yes. You can preview, copy, and download your current palette in five verified formats: .css (custom properties and utility classes), .json (full structured metadata), .csv (spreadsheet table), .svg (labeled vector swatch card), and .txt (plain-text summary).
11. Can I copy CSS color values?
Yes. You can copy individual HEX, RGB, RGBA, HSL, HSV, CMYK, CIELAB, or OKLCH values with a single click, copy all HEX values one per line, or copy a complete :root CSS custom property block.
12. How accurate are the color names?
The tool clearly distinguishes between (1) Exact W3C/CSS standard names, (2) Exact descriptive catalog names and aliases, (3) Closest named colors computed via CIEDE2000 perceptual distance, and (4) Approximate algorithmic hue/lightness/saturation descriptions. It never fabricates fake official names.
13. Can I use the colors in websites and designs?
Absolutely. All generated HEX, RGB, RGBA, HSL, and OKLCH values—along with the exported CSS variables and SVG swatches—are standard-compliant and ready to paste into CSS stylesheets, Figma, Adobe Illustrator, Tailwind configs, or design systems.
14. Are accessibility checks included?
Yes. The built-in WCAG 2.1 Contrast Checker computes exact sRGB relative luminance and contrast ratios for any foreground/background pair and tests compliance against WCAG AA Normal (4.5:1), AA Large (3.0:1), AAA Normal (7.0:1), and AAA Large (4.5:1) thresholds.
15. Does the tool store my palettes?
By default, recent colors and saved palettes are kept only in local browser memory for your current session. If you check the optional "Save palettes to browser localStorage" toggle, your saved palettes are stored locally on your device under a namespaced key and can be deleted at any time. No data is ever sent to a server.

Quick links to integrated modules in this suite and verified utilities on TextTool.in.

Explore All 96 Tools on TextTool.in ↗
Color Picker & 2D Editor (Built-In) HEX / RGB / HSL / OKLCH Color Converter (Built-In) WCAG Contrast Checker (Built-In) Palette & Harmony Generator (Built-In) CSS Custom Property Generator (Built-In) TextTool.in Main Directory ↗