What complementary colors are
In color theory, complementary colors sit on opposite sides of a color wheel, 180° apart. There is more than one complementary color wheel, though, and each answer is a convention of its wheel. Ask for the opposite color of red and a screen designer says cyan while a painter says green. This tool shows the answers from three wheels side by side, so you can pick the one that fits your work.
| Wheel | Complement of red | Complement of blue | Based on |
|---|---|---|---|
| HSL (screen) | #00FFFF cyan | #FFFF00 yellow | Red, green and blue light, as in CSS |
| RYB (painter's) | #00FF4D green | #FFA500 orange | Red, yellow and blue paint primaries |
| OKLCH (perceptual) | #009CB2 cyan | #734F00 dark gold | How the eye judges lightness and hue |
How each complement is calculated
- HSL: add 180° to the hue and keep the saturation and lightness. In RGB terms, each channel becomes the largest channel plus the smallest minus itself, which is why red
#FF0000becomes cyan#00FFFF. - OKLCH: add 180° to the OKLCH hue and keep the OKLCH lightness and chroma, so the two colors look about equally light. When that color is outside what an sRGB screen can show, it is brought into range with CSS Color 4 gamut mapping, which lowers the chroma.
- RYB: this tool builds its RYB wheel from the paint-mixing cube published by Nathan Gossett and Baoquan Chen, placing red, yellow and blue 120° apart with orange, green and purple between them. The cube gives an RGB color to each corner: red, yellow and blue paint, the orange, green and purple they mix to, white paper and a dark brown. The tool uses plain trilinear interpolation, the first of the two methods the paper gives; its sample code uses a curved version, so other RYB tools may give slightly different in-between hues. The hue is moved onto this wheel, turned 180° and moved back, keeping the HSL saturation and lightness.
The six saturated corners set where each hue sits on the RYB wheel:
| Cube corner | RYB hue | HSL hue of its RGB color |
|---|---|---|
| Red | 0° | 0° |
| Orange | 60° | 30° |
| Yellow | 120° | 60° |
| Green | 180° | 138.18° |
| Blue | 240° | 211.17° |
| Purple | 300° | 300° |
Between corners the tool follows the edge of the cube. The resulting mapping is continuous and always increasing, so it can be inverted precisely. RYB is a traditional art-education model, not a physical or measurement standard: real paints mix differently depending on their pigments, and other RYB wheels place the hues slightly differently.
Worked example: red
Take #FF0000, which is hsl(0, 100%, 50%) and oklch(62.8% 0.2577 29.23).
- HSL: 0° + 180° = 180°, so
hsl(180, 100%, 50%), which is#00FFFF(the CSS namesaquaandcyan). - OKLCH: 29.23° + 180° = 209.23°. At 62.8% lightness and 0.2577 chroma that hue is far outside sRGB, so gamut mapping lowers the chroma and gives
#009CB2, which measuresoklch(63.59% 0.1109 212.17): almost the same lightness, and a final clip that shifts the hue by about 3°. - RYB: red is at 0° on the RYB wheel, so its complement is at 180°, the green corner. That corner's RGB value (0, 0.66, 0.2) has an HSL hue of 138.18°, so the result is
hsl(138.18, 100%, 50%), or#00FF4D.
Complementary colors of common colors
HSL, RYB and OKLCH complements of 12 common CSS named colors, worked out with the same code as the tool above. Click a name for that color's codes and shades.
| Color | HEX | HSL complement | RYB complement | OKLCH complement |
|---|---|---|---|---|
| Red | #FF0000 | #00FFFF (aqua / cyan) | #00FF4D | #009CB2 |
| Orange | #FFA500 | #005AFF | #0001FF | #78C1FF |
| Yellow | #FFFF00 | #0000FF (blue) | #FF00FF (fuchsia / magenta) | #F3F1FF |
| Green | #008000 | #800080 (purple) | #80000C | #963BA3 |
| Blue | #0000FF | #FFFF00 (yellow) | #FFA500 (orange) | #734F00 |
| Purple | #800080 | #008000 (green) | #808000 (olive) | #00620F |
| Pink | #FFC0CB | #C0FFF4 | #D0FFC0 | #9BE4DC |
| Teal | #008080 | #800000 (maroon) | #802B00 | #9E585E |
| Navy | #000080 | #808000 (olive) | #805300 | #372200 |
| Gold | #FFD700 | #0028FF | #AB00FF | #CBD6FF |
| Brown | #A52A2A | #2AA5A5 | #2AA54F | #006D79 |
| Gray | #808080 | None: gray is neutral, so it has no hue to turn around the wheel. | ||
The columns differ because each wheel spaces the hues differently and keeps a different kind of lightness. On the RYB wheel blue goes with orange and yellow with purple, as in a classroom color wheel; at full strength that purple is magenta #FF00FF. Every result keeps the input's saturation and lightness, so dark CSS purple gets a dark yellow (olive) partner. The OKLCH column keeps the eye's sense of lightness instead, which is why light colors such as pink and gold get pale partners and dark navy gets a very dark one.
Split complementary colors, triadic and tetradic
The harmonies use the wheel you choose. Split complementary colors take the two hues 30° either side of the complement (base + 150° and + 210°); traditionally they give contrast with less tension than a direct pair. On the HSL wheel, red's split complements are #00FF80 and #0080FF.
Triadic colors are three hues 120° apart. Tetradic colors (a square) add 90°, 180° and 270°, which is two complementary pairs. The rectangle adds 60°, 180° and 240°, a neighbor of the base plus both complements; some sources call this a double complementary or tetradic scheme too, so naming varies. For analogous colors, neighbors a few degrees apart, use the palette generator in analogous mode.
Complements as text and background
Opposite hues are not the same as readable contrast. WCAG contrast depends on lightness, and complements often have similar lightness. Red and its HSL complement reach 3.19:1, enough only for large text at level AA, and its RYB complement reaches 2.93:1. OKLCH complements keep the lightness on purpose, so they almost always fail as text pairs: red and #009CB2 are 1.22:1. Some HSL pairs do pass, such as blue and yellow at 8:1, because HSL lightness does not match how light a color looks. The tool shows the ratio for each pair, and the contrast checker can suggest a lighter or darker version.
Common mistakes
- Mixing up wheels. A screen palette built on the RYB wheel, or a painting planned with HSL, gives pairs that feel off. Pick the wheel that matches the medium: HSL or OKLCH for CSS, RYB for a traditional painted look.
- Using the full-strength pair everywhere. Two saturated complements at equal size compete for attention. A common approach is one main color and its complement as a small accent.
- Ignoring the gamut. Very light or very dark colors have little room for chroma on the opposite side, so an OKLCH complement can come out nearly gray: the OKLCH complement of yellow
#FFFF00is#F3F1FF, a very pale lavender.