Color harmony in OKLCH: complementary, triadic and split palettes

By TechCompare · Updated · How we check

Keep lightness and chroma and turn only the hue, and the colors of a harmony stay as light as each other. In OKLCH, #6366F1 pairs with #937A00 as its complement.

Every palette from #6366F1

Each swatch opens in the Color Picker. The picked color has the brighter border.

Eleven steps of OKLCH lightness at your color's hue and chroma, named 50 to 950 like Tailwind's colors. Your color takes the step closest to its own lightness.

  1. 50#EFF4FF
    White text
    1.10below AA
    Black text
    19.05passes AA
  2. 100#CFD8FF
    White text
    1.41below AA
    Black text
    14.92passes AA
  3. 200#B0BCFF
    White text
    1.83below AA
    Black text
    11.48passes AA
  4. 300#939FFF
    White text
    2.43below AA
    Black text
    8.64passes AA
  5. 400#787FFF
    White text
    3.34below AA
    Black text
    6.28passes AA
  6. 500Base#6366F1
    White text
    4.47below AA
    Black text
    4.70passes AA
  7. 600#5351DB
    White text
    5.89passes AA
    Black text
    3.57below AA
  8. 700#443CC5
    White text
    7.78passes AA
    Black text
    2.70below AA
  9. 800#3625B0
    White text
    10.25passes AA
    Black text
    2.05below AA
  10. 900#2A029B
    White text
    13.29passes AA
    Black text
    1.58below AA
  11. 950#1F007F
    White text
    15.39passes AA
    Black text
    1.36below AA

Your color and the hue straight across the OKLCH color wheel, 180° away, at the same lightness and chroma.

  1. Base#6366F1
    White text
    4.47below AA
    Black text
    4.70passes AA
  2. +180°#937A00
    White text
    4.18below AA
    Black text
    5.02passes AA

The hues 30° to either side of yours. They're neighbors on the wheel, so they sit well together.

  1. Base#6366F1
    White text
    4.47below AA
    Black text
    4.70passes AA
  2. −30°#007FE3
    White text
    4.08below AA
    Black text
    5.14passes AA
  3. +30°#9C4FD8
    White text
    4.64passes AA
    Black text
    4.52passes AA

Three hues spread evenly around the wheel, 120° apart.

  1. Base#6366F1
    White text
    4.47below AA
    Black text
    4.70passes AA
  2. −120°#009752
    White text
    3.78below AA
    Black text
    5.55passes AA
  3. +120°#D93A00
    White text
    4.61passes AA
    Black text
    4.56passes AA

The two hues on either side of the complement, 150° and 210° from yours. Strong contrast, with less clash than the complement alone.

  1. Base#6366F1
    White text
    4.47below AA
    Black text
    4.70passes AA
  2. +150°#B56600
    White text
    4.32below AA
    Black text
    4.87passes AA
  3. +210°#5F8D00
    White text
    3.96below AA
    Black text
    5.30passes AA

Under each swatch: white text and black text on it, as a WCAG 2 ratio. AA marks 4.5:1 or more, enough for body text. A color sRGB can't show loses chroma until it fits, so its hue and lightness stay put.

Color harmony means picking colors by where they sit on the color wheel. The four classic schemes are complementary, analogous, triadic and split complementary, and each one is a fixed turn of the hue. The demo above builds all four from #6366F1, plus a scale of tints and shades. It works in OKLCH, so a turned hue keeps the lightness and strength of the color you started with. That's what makes the colors look like a set instead of a random mix.

Format
HEX
Example: #6366F1
Category
Modern Formats
Color knowledge base

How the palettes are built

Every palette starts from the OKLCH value of your color. #6366F1 is oklch(58.54% 0.2041 277.12), so its lightness is 58.54%, its chroma is 0.2041 and its hue is 277.12. A harmony keeps the lightness and chroma and turns the hue. Complementary adds 180°. Analogous goes 30° each way. Triadic goes 120° each way, which splits the wheel into three equal parts. Split complementary adds 150° and 210°, the two hues on either side of the complement.

A turned hue can land outside sRGB, the range a hex code can hold. Each hue has its own top chroma at each lightness, so a vivid color can have a complement that sRGB can't show at full strength. That happens with #6366F1. Its complement comes out as #937A00, at chroma 0.1202 instead of 0.2041. The tool uses the binary search gamut mapping from CSS Color 4. It lowers the chroma and keeps the lightness and hue, until clipping what's left would change the color by less than 0.02 deltaE OK. The spec calls 0.02 one just noticeable difference, so the clip can shift the hue a little but the color still reads as the one it aimed for.

HSL can turn a hue too, but its lightness doesn't follow what the eye sees. Turn #6366F1 by 180° in HSL, with the same saturation and lightness, and you get #F2EF64. That color sits at 92.87% OKLCH lightness, while the OKLCH complement #937A00 stays at 58.58%. In the HSL pair one color reads far lighter than the other, so it pulls the eye away from the base.

The tints and shades scale works the other way round. It keeps hue and chroma and moves the lightness, in 11 steps named 50 to 950 like Tailwind's colors. The scale runs from 97% OKLCH lightness at step 50 to 27% at step 950. Your color takes the step closest to its own lightness and keeps its exact value there, so #6366F1 is step 500. The steps on each side of it are spread evenly. Pale and deep steps often can't hold the full chroma, so they go through the same gamut mapping.

Under each swatch the demo shows the WCAG 2 contrast ratio of white text and of black text on it. AA marks 4.5:1, the level for body text. Every color passes with one of the two, because the two ratios always multiply to 21, so the bigger one can't drop under 4.5. On the #6366F1 scale, white text passes on step 600 through 950, and black text on 50 through step 500. Test the exact pair you ship in the Contrast Checker.

Verdict

Pick the scheme by the job. A complementary or split complementary color makes a strong accent, like a call to action next to a brand color. Analogous colors sit calmly together, which suits backgrounds, gradients and illustrations. Triadic gives three clearly different hues for categories. Then take the tints and shades of each color you keep: a pale step for backgrounds, the base for buttons and a deeper step for hover states and text. Copy the palette as CSS variables or a Tailwind 4 @theme block from the Color Picker, and rename brand to your own name.

The swatches are mapped into sRGB, so each one is a hex code that looks the same on any screen. A wide-gamut screen can show stronger versions of these hues, which OKLCH in CSS covers.

More Color scenarios

Hex to RGB
A hex color code is three RGB numbers written in base 16.
View details
RGB vs CMYK
Screens add light and print adds ink. See one color in both, and why a plain CMYK formula can't promise a print match.
View details
HSL color model
Hue, saturation and lightness, with three live sliders and a table of common colors in hex, RGB and HSL.
View details

Frequently asked questions

What is color harmony?
It's a set of colors chosen by their positions on the color wheel, so they look like they belong together. The common schemes are complementary (opposite hues), analogous (neighbors), triadic (three evenly spaced hues) and split complementary (the two neighbors of the complement). They're rules of thumb from art and design, so treat them as a starting point, not a law.
Why is a palette color less vivid than the one I picked?
sRGB can't show every chroma at every hue and lightness. Deep yellows and pale blues, for example, top out at low chroma. When a turned hue or a new step can't hold your color's chroma, the tool lowers the chroma until it fits and keeps the lightness and hue, so the swatch is still a real hex code.
What do the step names 50 to 950 mean?
They're the step names Tailwind CSS uses, from 50 for the palest to 950 for the deepest. The Palettes card uses the same names, so a copied @theme block gives you classes like bg-brand-50 through bg-brand-950. The colors themselves come from your color, not from Tailwind's palette.
How do I use the copied @theme block in Tailwind 4?
Paste it into the CSS file that imports Tailwind, after the @import line and not inside any other rule. Each --color-* line becomes a set of classes, like bg-brand-100, text-brand-900 and border-brand-300. Tailwind 4 reads these from CSS, so there's no config file to edit.
What happens when I click a swatch in the Color Picker?
It becomes the picked color. The converter, the nearest colors and the palette all update, and so does the link in the address bar. Click a complement and switch to Triadic, for example, to build a second palette from it.