Complementary Color Calculator
Enter a hex color to find its complementary color.
Result
How it is calculated
The tool reads a hex colour (with or without #; three-digit shorthand such as #f60 is expanded to six digits) and converts it from RGB to HSL: hue, saturation and lightness. The complement keeps saturation and lightness and rotates the hue by half a turn: hue' = (hue + 180°) mod 360°. That HSL value is converted back to RGB and written as a lowercase hex code. A second answer is the RGB invert, 255 − channel for red, green and blue separately. The two usually differ; they match only for some colours, such as pure red. Greys have no hue, so their complement is themselves, while the invert flips them. Codes with the wrong length or non-hex characters give no result.
Worked example
Take #1E6BFF. Its channels are red 30, green 107, blue 255, which in HSL is hue 219.5°, saturation 100% and lightness 55.9%. Add 180° to the hue: 39.5°, an orange. Keep saturation and lightness and convert back, giving red 255, green 178, blue 30. The complement is #ffb21e. The RGB invert is different: 255 − 30 = 225, 255 − 107 = 148, 255 − 255 = 0, which gives #e19400. The original is echoed as #1e6bff.
Common mistakes
- Expecting the HSL complement and the RGB invert to be the same. For this blue they give a bright orange (#ffb21e) and a darker amber (#e19400), so choose the one your design method calls for.
- Entering a colour with an alpha pair such as
#1E6BFF80. Only 3 or 6 hex digits are accepted, so remove the transparency digits first. - Expecting a complement for black, white or grey. They have no hue to rotate, so the complement is the same colour, for example #808080 returns #808080.
- Treating the result as a finished palette. The complement is a single colour at the same lightness; text on it may still fail a contrast check, so test readability separately.
- Assuming the traditional painter's wheel gives the same answer. The tool rotates the screen RGB hue, so complements for blue come out orange, not the yellow some art-class wheels teach.
About this calculator
A complementary color is the color diametrically opposite a given hue on the color wheel — pairing them creates the strongest possible contrast, which is why complementary schemes (blue/orange, red/green, yellow/purple) are a foundational tool in design, painting, and branding. This calculator finds it by converting your hex color to HSL (hue, saturation, lightness) and rotating the hue value by 180° while keeping saturation and lightness unchanged, then converting back to hex — the standard color-theory method for finding a true complement.
It also shows the alternative you get from a simple RGB inversion (subtracting each of the red, green, and blue channel values from 255), which produces a visually different result from the HSL-based complement — an RGB invert is the mathematical “negative” of a color, while the HSL hue rotation is the perceptually correct complementary color used in color theory and design tools like Adobe Color.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments