Online Color Palette Generator: Scales, Harmonies, and CSS Export
What Is a Color Palette Generator
A color palette generator builds a usable color set from one seed color. Designers and developers use it for brand accents, UI themes, and chart series. On this site the Color Palette Generator stays in the browser: pick a base color, choose a scheme, then copy HEX values, CSS variables, or a Tailwind snippet.
Schemes the tool actually ships
| Scheme | What you get | Typical use |
|---|---|---|
| Tint / shade scale | 11 steps (50–950), base at 500 | Tailwind-style brand ramps, button states |
| Complementary | Base + hue +180° | High contrast accents |
| Analogous | Base ±30° | Calm UI neighborhoods |
| Triadic | Base +120° / +240° | Three-role UIs (primary / secondary / accent) |
| Split-complementary | Base +150° / +210° | Contrast with less clash than pure complement |
| Tetradic | Base +90° / +180° / +270° | Rich multi-hue systems (needs curation) |
Monochromatic theory and the tint/shade scale are related but not identical: the scale mixes toward white/black in sRGB; a pure monochromatic wheel set only nudges hue. Use scale when you need a full light→dark ramp; use a harmony when you need related hues.
Why generate instead of hand-picking
- Brand: expand one logo hex into a usable ramp or accent set
- UI tokens: fill
surface/accentroles quickly, then rename - Charts: pick high-separation hues (triadic / tetradic) before tuning luminance
- Accessibility: generate candidates, then verify with a contrast checker
- Prototyping: swap schemes without opening a design file
How to use the ToolVault generator
- Pick a base color (color picker or HEX / CSS color string)
- Choose a scheme (scale or a wheel harmony)
- Generate — scale yields 11 steps; harmonies yield 2–4 named slots
- Click a swatch to copy HEX; or Copy CSS vars / Copy Tailwind snippet
- Spot-check text/background pairs in the contrast tool before locking tokens
There is no separate HSL slider panel: change the seed color and regenerate. For one-off format conversion (HEX ↔ RGB ↔ HSL with alpha), use the Color Converter.
Color theory that still matters
The color wheel
Harmonies are hue arithmetic on the wheel:
Red (0°)
/ \
Magenta Orange
| |
Purple Yellow
| |
Blue Yellow-Green
\ /
Green (120°)
HSL mental model
- H: 0–360° (what harmony offsets)
- S / L: kept from the seed when rotating hue — so a muted seed stays muted
Sketch formulas (illustrative)
const complementary = (hue) => (hue + 180) % 360;
const analogous = (hue) => [(hue - 30 + 360) % 360, hue, (hue + 30) % 360];
const triadic = (hue) => [hue, (hue + 120) % 360, (hue + 240) % 360];
The on-site implementation rotates in HSL via colorjs.io, then exports HEX / RGB / HSL strings per slot.
Export shapes that survive paste
CSS variables (what Copy CSS vars emits):
:root {
--color-base: #3B82F6;
--color-complement: #F69C3B;
}
Tailwind snippet (drop under theme.extend.colors):
brand: {
'base': '#3B82F6',
'complement': '#F69C3B',
},
Rename keys to semantic roles (surface, on-surface, accent) before shipping — raw base / triad-120 names are generation labels, not design language.
Generation strategies: four families
Harmony-based (wheel offsets — predictable, sometimes flat), perceptual-ramp (OKLCH/Lab interpolation — smooth scales for data viz), extraction (pull colors from an image — brand-faithful, source-dependent), and algorithmic (golden-ratio hue stepping — distinctive, uneven). This generator covers harmony + tint/shade ramp. Image extraction and OKLCH ramps live elsewhere in the design stack; do not expect one tool to own every family.
Contrast as a generation constraint
Generating first and checking contrast last fails the same way waterfall testing fails. Practical loop: generate → pick text/background candidates → verify ≥4.5:1 (AA) for body text. A second trap: scale steps that look distinct in the UI but cluster in luminance (five mid blues). Prefer a ramp that spans roughly light near-white through near-black before calling the palette “done.”
Dark mode is a second palette
Inverting a light theme (filter: invert) breaks shadows, brand hues, and images. A real dark set reassigns roles: near-black surfaces (not pure #000), body text around ~87% white, and slightly desaturated accents so they do not vibrate on dark. Keep tokens semantic (surface / on-surface / accent) so light and dark are two assignments of the same roles — not two unrelated HEX dumps.
Implementer's notes
- Scale mode mixes the seed toward white/black in sRGB; step
500is the unchanged seed. - Harmony modes keep the seed’s saturation and lightness while rotating hue — desaturated seeds stay quiet.
- Invalid color strings yield an empty list (no crash); fix the seed and regenerate.
- CSS / Tailwind export is copy-only — nothing is written to disk or sent to a server.
Exporting without painting yourself into a corner
Once a seed and harmony mode look right in the palette generator:
- Copy CSS variables or Tailwind-style scales into the design token file — not into scattered component styles
- Name roles (
--color-accent) instead of freezing hex in JSX class strings - Run body/background pairs through the contrast checker before calling the palette finished
- Generate the dark-mode assignment as a second pass (same roles, different values) — do not invert the light sheet
That sequence keeps the generator as a starting point, not as the long-term source of truth.
FAQ
How should I choose brand colors?
- Define the personality (calm, playful, technical)
- Lock 1–2 primaries from the logo
- Generate secondary / accent via complementary or split-complementary
- Verify WCAG AA contrast (4.5:1 for normal text)
How many colors belong in a product palette?
Usually 3–5 chromatic roles plus a neutral ramp. The “60-30-10” layout (primary / secondary / accent) still works for marketing surfaces; product UI often needs more neutrals than accents.
How do I keep accessibility honest?
- Body text ≥ 4.5:1; large text (≥18px / 14px bold) ≥ 3:1
- Do not encode meaning with color alone
- Recheck after dark-mode reassignment — contrast is per pair, not per brand hex
From ToolVault. Related: Palette Generator, Color Converter, Contrast Checker. More tools on the homepage.
Related Tools
Related Articles
Markdown to Word: Native Style Mapping and the Inline-Format Downgrade List
Turning a Markdown draft into a deliverable .docx: pandoc CLI vs in-browser local conversion, how headings/tables/code blocks map to native Word styles, which inline formats degrade to plain text, and why 'editable' beats 'looks right'.
Word to Markdown: Two Clean Paths and What Survives the Conversion
How to convert .docx to Markdown cleanly: pandoc CLI vs in-browser local conversion, a format fidelity table for headings/tables/images/auto-numbering, and fixes for the .doc legacy format, image bloat, and merged-cell tables.
China License Plate Rules and Validation: Standard, New Energy, and Special Formats Explained
Mainland China plate encoding rules in full: the standard blue plate, the GA36D-2018 new-energy format, armed police and embassy plates, province abbreviations and issuing-authority letters — with an online validator.