Random Color Palette Generator
Generate beautiful random color palettes with harmony modes, lock colors, copy hex/RGB/HSL codes, export palettes as PNG or CSS. Free online tool.
About
Color palette selection is not arbitrary. A mismatched palette degrades readability, breaks visual hierarchy, and reduces user engagement by measurable margins. This generator produces palettes using color theory harmonics rooted in the HSL (Hue, Saturation, Lightness) color model. It calculates complementary, analogous, triadic, split-complementary, tetradic, and monochromatic schemes by rotating the hue angle H in precise degree increments. Each generated color includes its WCAG 2.1 contrast ratio against white and black backgrounds, computed from relative luminance L, so you can verify accessibility compliance before committing to a scheme.
The tool approximates nearest CSS named colors via Euclidean distance in RGB space. Limitation: perceptual uniformity is not guaranteed - two colors equidistant in RGB may not appear equally distinct to the human eye. For critical accessibility work, validate with a dedicated WCAG checker. Pro Tip: lock one brand color and regenerate the rest to build cohesive palettes around an existing identity.
Formulas
Color harmony is computed by rotating the base hue H0 in the HSL cylinder. For a given offset angle θ:
WCAG 2.1 contrast ratio between two colors uses relative luminance:
where L1 is the lighter luminance. Relative luminance from sRGB:
Each sRGB channel is linearized: if c ≤ 0.04045, then clin = c12.92; otherwise clin = ((c + 0.055) ÷ 1.055)2.4. Nearest CSS color name is found via minimum Euclidean distance: d = √ΔR2 + ΔG2 + ΔB2.
Where H = Hue (0 - 360°), S = Saturation (0 - 100%), L = Lightness (0 - 100%), CR = Contrast Ratio, R, G, B = Red, Green, Blue channels (0 - 1).
Reference Data
| Harmony Mode | Hue Offsets | Colors | Best Use Case | Visual Feel |
|---|---|---|---|---|
| Complementary | 0°, 180° | 2 | High contrast CTAs | Bold, vibrant |
| Analogous | −30° to +30° | 5 | Soft, cohesive layouts | Harmonious, calm |
| Triadic | 0°, 120°, 240° | 3 | Balanced, playful designs | Dynamic, balanced |
| Split-Complementary | 0°, 150°, 210° | 3 | Softer contrast than complementary | Nuanced tension |
| Tetradic (Rectangle) | 0°, 90°, 180°, 270° | 4 | Rich, complex interfaces | Diverse, full-spectrum |
| Monochromatic | 0° (vary S/L) | 5 | Minimalist, elegant UIs | Clean, sophisticated |
| Random | Fully random HSL | 5 | Exploration, inspiration | Unpredictable |
| Warm | 0° - 60° | 5 | Food, energy, passion themes | Inviting, energetic |
| Cool | 180° - 270° | 5 | Tech, finance, trust themes | Professional, calm |
| Pastel | Random H, high L, low S | 5 | Soft branding, children’s products | Gentle, approachable |
| Earth Tones | 20° - 50°, low S | 5 | Organic, nature, sustainability | Grounded, natural |
| Neon / Vibrant | Random H, max S, medium L | 5 | Nightlife, gaming, youth brands | Electric, loud |