Color Palette Generator

Web

Generate color palettes from a base color with complementary, analogous, triadic and monochromatic schemes. Export HEX, RGB and HSL as JSON, CSS or TXT.

Base Color
Count5
Format
Palette
Click a swatch to copy
Export

About Color Palette Generator

Color palettes are a daily need for designers and front-end developers: derive a full swatch set from a brand color, prepare distinguishable colors for data visualization, or define UI state colors. This tool generates complementary, analogous, triadic, split-complementary, tetradic and monochromatic schemes from a base color in HSL space, and outputs HEX, RGB and HSL values for every swatch, exportable as JSON, CSS variables or TXT for direct use in design tools or code. A handy workflow is to lock the primary brand color while regenerating the supporting hues, so you preserve recognition while exploring alternatives without hand-tuning. One nuance to keep in mind: equal hue spacing in HSL does not always feel visually even, so beyond hue it is worth checking lightness and saturation balance across the set, and verifying text/background contrast separately for accessibility. Everything runs client-side, nothing is uploaded — safe even for unreleased brand palettes. The hard part of colour work is rarely producing five colours, it is producing five that work across light and dark modes, buttons and charts. Picking by eye tends to yield swatches of equal lightness that look tidy but flat, leaving the interface without hierarchy or emphasis. Generating by rule fixes the relationship in hue first and then opens gradients in lightness and saturation. Common rules serve different purposes. Monochromatic takes different lightnesses of one hue, the safest and hardest to get wrong, which suits a primary colour system. Analogous takes neighbouring hues for a harmonious but varied feel. Complementary takes the opposite hue for strong contrast, good for emphasis but glaring at large areas, so it usually appears only in small accents. Triadic divides the wheel into thirds, rich but demanding in proportion, and slightly off balance it reads as messy. Practical notes: Whatever the rule, define roles as primary, secondary and accent rather than treating generated swatches as equals, because clear roles are what give an interface hierarchy. Then verify readability item by item: contrast between text and background, behaviour in both light and dark modes, and distinguishability for colour vision deficiency. Those three are the hard requirements for a palette to ship and have nothing to do with taste. In engineering terms, emit design tokens rather than scattered hex values, so a redesign changes one place. Limits: The tool offers a starting point, not a conclusion, since a palette must be judged in a real interface where two colours that harmonise in a swatch can fall out of balance once text and icons occupy real areas and positions. Display devices also differ, so the same set looks different on a wide-gamut panel and an ordinary one, and brand colours must follow the colour space the guidelines specify, verified across devices. Finally, more colours is not better: beyond five to seven primaries, a team struggles to apply them consistently. Data and privacy: a palette may be unreleased product design and therefore internal. This tool generates in the browser without uploading, and for unreleased designs it can be used offline, keeping the work from leaking early. A common misuse is treating the generated palette as final: colours that harmonise on a swatch fall out of balance once real areas and neighbours come into play. Before shipping, check three things on the real page — text-on-background contrast, behaviour in both themes, and distinguishability for colour vision deficiency. Another is letting the count drift: beyond five to seven primaries a team struggles to stay consistent.

How It Works Internally

The common rules act on the hue wheel and the lightness axis: monochromatic varies lightness within one hue, analogous takes neighbouring hues, complementary takes the opposite hue, and triadic divides the wheel into thirds. Whatever the rule, the decisive part is role assignment rather than the values themselves — primary, secondary and accent must be distinguished, or even a good palette is applied evenly and loses hierarchy.

InputA monochromatic scheme from primary #0d9488
OutputProduces one hue at several lightnesses; text-on-background contrast still needs checking rather than eyeballing

Measured on This Page

ComplementaryBase #0d9488 (hue 175°) alternates 175/355 — exactly 180° apart
Analogous115/145/175/205/235 — evenly spread ±60° around the base in 30° steps
Triadic175/295/55 — three hues 120° apart
MonochromaticAll five swatches share one hue, varying lightness only
ContrastThe lowest text/background ratio across 20 swatches in four schemes is 5.41:1, clearing WCAG AA (4.5:1) — implemented with true relative luminance rather than an HSL-lightness heuristic (a saturated green like #18960d has lightness ~32% yet bright luminance; the old heuristic hit only 3.88:1 and was replaced)
Count bounds2 and 12 both exact (bounds 2–12)

Two colour-theory notes: complementary means 180° apart on the hue wheel, measured exactly here; and analogous is commonly ±30–60°, with this page using ±60° in 30° steps for a 120° total spread. The contrast math follows WCAG 2.x relative luminance (0.2126R + 0.7152G + 0.0722B with gamma expansion), not HSL lightness — the two often disagree, most of all on saturated dark colours. Palettes export as JSON/CSS variables and fully recompute when the base colour or scheme changes.

How this was measured: Each scheme was generated once, all swatch colours read from inline styles, hues reverse-computed with Python colorsys, and the scheme geometry verified (complementary 180°, triadic 120°, monochromatic same hue, analogous total spread ≤130°); the text-on-colour choice per swatch was scored with WCAG contrast (minimum must clear 4.5:1); counts probed at 2 and 12. · Measured 2026-10-30

How to Use

  1. Open "Color Palette Generator"
  2. Choose a base color or hit Random for a new start
  3. Switch between complementary, analogous and triadic schemes
  4. Adjust the swatch count and the HEX/RGB/HSL format
  5. Click a swatch to copy it, or export JSON, CSS or TXT

Use Cases

  • Brand palette derivation — Enter your brand color and generate a full set of secondary and neutral colors.
  • Data visualization — Generate high-contrast multi-color palettes for charts and maps, avoiding color-blind unfriendly combinations.
  • UI state colors — Derive success, warning, error and info state color variants from your primary color.
  • Web color inspiration — Quickly try different palettes to find a visual direction for landing pages or posters.
  • Design system output — Export CSS variables or JSON to plug straight into your design system or front-end code.

FAQ

Which color schemes are supported?

Complementary, analogous, triadic, split-complementary, tetradic and monochromatic - six schemes in total.

Which input color formats are supported?

HEX (e.g. #1A2B3C), RGB (e.g. rgb(26,43,60)) and HSL (e.g. hsl(210,50%,40%)). You can also pick a color directly with the color picker.

Can I export as CSS variables?

Yes. When exporting as CSS, each color becomes a --color-1, --color-2 custom property, ready to paste into your stylesheet.

How do I ensure accessible, high-contrast palettes?

The tool generates harmonious hues but does not guarantee contrast. Check text/background WCAG contrast separately and verify color-blind friendliness with a vision simulator.

Can I lock the primary and vary only the accents?

Yes. Lock certain colors and regenerate the rest, exploring secondary and neutral combinations while keeping the brand primary intact.

Are colors uploaded?

No. All palette calculations run locally in your browser. Nothing is uploaded, even for unreleased brand colors.

The generated palette looks harsh in dark mode. What should I change?

Dark interfaces need different treatment: hold the hue, lower saturation and redistribute lightness rather than reusing the light-theme values, and avoid a plain inversion, which shifts hue and saturation together and looks muddy. Prepare a dark variant for each key colour and verify text-on-background contrast separately, since the same values rarely pass in both themes.

The generated palette fails contrast checks?

Generated combinations do not guarantee accessibility. Run the foreground/background pair through a contrast checker: body text needs 4.5:1, large headings 3:1. When it fails, adjust lightness rather than hue — lightness distance is the most controllable lever.