Color Palette Generator Calculator
Enter a base color and a scheme to build a matching color palette.
What this calculator does
Enter one base hex color and pick a scheme, and the calculator returns the matching palette as ready-to-paste hex codes. With the default input of #3498db and the complementary scheme, it returns #3498db itself plus its color-wheel opposite #db7734. Depending on the scheme you choose, you get two to five coordinated colors, every one of them a six-digit hex value straight out of the computation, with no rounding shortcuts or web-safe snapping.
How the palette math works
The base hex is first converted to HSL, the hue-saturation-lightness model. Lightness is the average of the largest and smallest RGB channel, saturation measures how far the color sits from gray, and hue locates it on the 0–360° color wheel. For #3498db — RGB 52, 152, 219 — that conversion yields a hue of about 204°, saturation about 70% and lightness about 53%, which is a mid-blue.
The scheme then adds fixed offsets to the hue and wraps the result with a modulo 360 so the wheel never overruns: 350° + 30° wraps to 20°, which is why opposite-side colors still come out cleanly. Saturation and lightness stay untouched for the hue-based schemes, then each resulting HSL triple converts back to RGB and formats as hex. Because only the hue changes, every generated color keeps the same vividness and brightness as your base.
The five schemes
| Scheme | Hue offsets applied | Colors returned |
|---|---|---|
| Complementary | 0°, 180° | 2 |
| Analogous | −30°, 0°, +30° | 3 |
| Triadic | 0°, 120°, 240° | 3 |
| Tetradic | 0°, 90°, 180°, 270° | 4 |
| Monochromatic | lightness −30, −15, 0, +15, +30 points | 5 |
Monochromatic is the one scheme that does not rotate the hue at all. It keeps hue and saturation fixed and steps the lightness up and down, producing five shades and tints of the same color. If your base lightness sits near the top of the range, the +30 and +15 steps clamp at 100 and collapse into near-identical pale swatches, so a base with mid-range lightness gives the most distinct ramp.
Worked example: #3498db complementary
The default base has a hue of roughly 204°. Adding the 180° offset gives 384°, and the modulo wraps that to 24° — a warm orange sitting directly across the wheel from the blue. Because saturation and lightness are unchanged, the generated color keeps the same weight and intensity: the output is #db7734. Notice the pleasing coincidence that the hex digits mirror the input (#3498db versus #db7734); that is what holding saturation and lightness fixed does to a color at the opposite hue.
What each scheme yields for the default base
- Complementary: #3498db and #db7734, hues 204° and 24°
- Analogous: hues 174°, 204° and 234° at the same saturation and lightness
- Triadic: hues 204°, 324° and 84°, evenly spaced thirds of the wheel
- Tetradic: hues 204°, 294°, 24° and 114°, a full rectangle on the wheel
- Monochromatic: lightness stepped to roughly 23%, 38%, 53%, 68% and 83% at hue 204°
Choosing a scheme for the job
Use complementary for maximum separation — a blue primary with an orange call-to-action button reads instantly because the two hues pull the eye in opposite directions. Analogous suits calm, cohesive surfaces such as dashboards and backgrounds, since ±30° neighbors never fight. Triadic gives three equally strong accents that stay coordinated, which works well for category colors in charts. Tetradic supports richer two-accent layouts but gets noisy if all four colors run at full saturation; keep one as the hero and mute the rest through opacity or gray mixing.
Pairing the palette with accessibility
Because the hue-based schemes preserve lightness, they do not by themselves fix text contrast: #3498db and #db7734 have nearly the same luminance, so white text passes or fails on both almost identically. After generating a palette, run each candidate text-and-background pair through a contrast check — the sibling color contrast checker grades pairs against WCAG AA and AAA. If a color fails, step its lightness down a stop or two while keeping the hue, which preserves the palette’s character.
Common mistakes with generated palettes
- Assuming every palette color works as body text on white — hue rotation does not change luminance, so contrast must be verified separately
- Using all four tetradic colors at equal visual weight instead of one hero plus three supporting tones
- Pasting an rgb() string or 8-digit hex with alpha — the parser accepts 3- and 6-digit hex only, so #fff works but rgba(52,152,219,0.5) returns an error
- Expecting a distinct five-step monochromatic ramp from a base whose lightness is already above 70% or below 20%, where the ±30 clamping flattens the ends
- Generating from an already-desaturated base: with saturation near 0% every hue offset lands on the same gray
The saturation point deserves emphasis. Hue offsets only mean something while the color actually has chroma; a base of #808080 (0% saturation) returns five identical-looking grays under any hue-based scheme, and even monochromatic differs only in lightness. Pick a base with saturation of at least 30% if you want the relationships to be visible.
Why hue-based harmony works
The color wheel orders hues by wavelength, and painters have exploited fixed angular relationships on it for over a century. Complementary pairs sit at maximum hue distance, so neither color can be mistaken for a shade of the other. Triadic spacing of 120° guarantees no two colors are close neighbors, which keeps multi-series charts legible. These rules predate digital color, but the HSL conversion makes them computable in one line: rotate the hue, keep everything else, convert back. The result is a palette that feels deliberate because its geometry is deliberate, even before you tune saturation and lightness by hand for the specific surface.
Frequently asked questions
What is a monochromatic palette?
It keeps one hue and varies only lightness, producing shades and tints of the same color. This calculator steps lightness by −30, −15, 0, +15 and +30 points, so the default blue base yields a five-step ramp from about 23% to 83% lightness.
Why convert through HSL?
Hue, saturation and lightness separate color from brightness, so rotating the hue gives natural color-wheel relationships without changing how light or vivid the colors are.
Are the colors web-safe hex?
Every generated color is returned as a six-digit hex code ready for CSS. They are not limited to the old 216-color web-safe set; values span the full 0–255 range per channel.
What palette does #3498db complementary produce?
Two colors: #3498db and its 180° opposite #db7734. The base converts to about 204° hue, 70% saturation, 53% lightness, and the generated color keeps the same saturation and lightness at hue 24°.
How many colors does each scheme return?
Complementary returns 2, analogous and triadic return 3, tetradic returns 4, and monochromatic returns 5. The base color is always included in hue-based schemes.
Do generated palette colors pass WCAG contrast?
Not automatically. Hue rotation preserves lightness, so each generated color has roughly the same luminance as the base. Check text-and-background pairs separately and step lightness if a pair fails.
What is the difference between triadic and tetradic?
Triadic spaces three hues 120° apart around the wheel; tetradic uses four hues 90° apart. Tetradic offers more accents but needs one dominant color to avoid visual noise.
Why does my monochromatic palette repeat the same color?
Lightness shifts clamp at 0 and 100. A base above 70% lightness pushes the +15 and +30 steps to the ceiling, collapsing them into near-identical pale swatches.
How do I darken one color of the palette?
Lower its lightness while keeping hue and saturation. Dropping the default blue from 53% to about 33% lightness gives a deeper shade suitable for text, which is exactly what the monochromatic scheme automates.
Method and sources
- HSL color-wheel harmony schemes (complementary, analogous, triadic, tetradic).