Color Converter

Paste a colour in any notation and get every other one back, plus tints, shades and harmony palettes and a contrast check that tells you straight out whether text will be readable.

🔒 Your data never leaves your device🆓 Free🙅 No sign-up

🎨 Pick a colour

HEX, rgb(), hsl() or a CSS name — #1e90ff, rgb(30 144 255), hsl(210 100% 56%), dodgerblue.

The picker has no alpha channel — use the slider below for transparency.

1 is fully opaque, 0 fully transparent.1

#1e90ff · rgb(30, 144, 255) · hsl(210, 100%, 55.9%)

🔁 Every format

FormatValueCopy
HEX#1e90ff
HEX + alpha#1e90ffff
RGBrgb(30, 144, 255)
RGBArgba(30, 144, 255, 1)
HSLhsl(210, 100%, 55.9%)
HSLAhsla(210, 100%, 55.9%, 1)
HSVhsv(210, 88.2%, 100%)
CMYKcmyk(88%, 44%, 0%, 0%)
CSS namedodgerblue

🧪 Palettes

Click any swatch to make it the current colour.

🤍 Tints (mixed with white)

#44a3ff
#69b5ff
#8fc8ff
#b4daff
#daedff

🖤 Shades (mixed with black)

#1978d5
#1460aa
#0f4880
#0a3055
#05182a

↔️ Complementary

#1e90ff
#ff8d1e

🎚️ Analogous

#1efffe
#1e90ff
#1e20ff

🔺 Triadic

#1e90ff
#ff1e90
#90ff1e

🔻 Split complementary

#1e90ff
#ff1e20
#fffe1e

👁️ Contrast checker

Any colour value. Falls back to white if it cannot be read.

Preview
The quick brown fox jumps over the lazy dog.
Large text sample
On your background
3.24:1
Large text only — fails AA for body text
On white
3.24:1
⚠️
On black
6.49:1
✅ Pass AA large text (3:1)❌ Fail AA body text (4.5:1)❌ Fail AAA large text (4.5:1)❌ Fail AAA body text (7:1)
Is this readable? Large text only — fails AA for body text3.24:1

How to use the colour converter

  1. Enter a colour in any supported notation — a HEX code, rgb(), hsl() or a CSS name like dodgerblue. The native colour picker is there if you would rather choose visually.
  2. Set the alpha with the slider if you need transparency. It feeds the RGBA, HSLA and eight-digit HEX outputs.
  3. Copy what you need. Every format has its own copy button, so you can take hsl() for CSS and CMYK for a print brief without retyping anything.
  4. Browse the palettes. Tints, shades, complementary, analogous, triadic and split-complementary sets are generated live; click any swatch to make it the current colour and carry on from there.
  5. Check the contrast. Compare against white, black or any custom background, read the AA and AAA badges, and look at the live text sample.

How the conversions work

All formats are stored internally as RGBA and converted on demand, which is why every round-trip comes back to the same HEX code.

Format Range Notes
HEX #000000#ffffff 3, 4, 6 and 8 digits all accepted
RGB 0–255 per channel Percentages like rgb(100% 0% 0%) also work
HSL H 0–360, S and L 0–100% Cylindrical, easy to lighten or darken
HSV H 0–360, S and V 0–100% Common in colour pickers
CMYK 0–100% each Subtractive, approximate for screens
Name 148 CSS keywords rebeccapurple, tomato, cornflowerblue

Contrast follows the WCAG definition. Each sRGB channel is linearised — divided by 12.92 below the 0.04045 threshold, otherwise raised to the power 2.4 after a gamma offset — and combined into a relative luminance with the weights 0.2126, 0.7152 and 0.0722. The ratio is then the lighter luminance plus 0.05 divided by the darker plus 0.05.

L = 0.2126 R + 0.7152 G + 0.0722 B
ratio = (L1 + 0.05) / (L2 + 0.05)

That is why the range is 1 to 21: black has a luminance of 0 and white of 1, giving 1.05 ÷ 0.05 = 21.

Worked examples

Dodger blue. #1e90ff is rgb(30, 144, 255), hsl(210, 100%, 55.9%) and hsv(210, 88.2%, 100%), and it has an exact CSS name: dodgerblue. Against white it manages only 3.24:1, which fails AA for body text but passes for large text. Against black it reaches 6.49:1.

The classic grey. #777777 on white is 4.48:1 — just under the 4.5:1 AA threshold for body text, which is exactly the kind of near-miss the badges are there to catch. Darkening it to #767676 pushes it over.

Maximum contrast. #ffffff against #000000 is 21:1, the highest possible value and the reason it is used as the reference point.

Shorthand and alpha. #f00 expands to #ff0000, and #ff000080 is the same red at roughly 50% alpha — rgba(255, 0, 0, 0.502). The eight-digit form is the compact way to write a translucent colour in CSS.

A harmony set. Starting from pure red, the complementary colour is cyan #00ffff, the triad is red, #00ff00 and #0000ff, and the analogous pair is #ff0080 and #ff8000. All of them are simple hue rotations with saturation and lightness untouched.

Tips and common mistakes

  • Do not judge contrast by eye. Mid-tone greys and saturated blues both look more readable than they measure. Check the number.
  • Large text is 18.66px bold or 24px regular. Below that, the 4.5:1 threshold applies rather than 3:1.
  • Contrast is not the whole of accessibility. Colour alone should never carry meaning: pair it with a label, an icon or a pattern for anyone who cannot distinguish the hues.
  • Work in HSL for variations. Changing lightness by ten per cent gives a predictable hover state; nudging a HEX code by hand rarely does.
  • CMYK values are indicative. Rich blacks, spot colours and paper stock all move the result. Ask the printer for a proof.
  • Watch out for HSL rounding. hsl(210, 100%, 55.9%) and hsl(210, 100%, 56%) are different colours by one unit of blue. Copy the value rather than retyping it.

Glossary

  • Alpha – opacity from 0 (invisible) to 1 (solid).
  • Relative luminance – perceived brightness on a 0–1 scale, used for contrast maths.
  • Tint / shade – a colour mixed with white or with black.
  • Complementary – the colour directly opposite on the wheel, 180 degrees away.
  • Gamut – the set of colours a device can actually reproduce; CMYK’s is smaller than sRGB’s.

Privacy

Everything runs in your browser. Colour values are converted in JavaScript on this page — nothing is uploaded, logged or stored, and no palette you build here is visible to anyone but you.

Frequently asked questions

What does the contrast ratio mean?

It compares the relative luminance of two colours on a scale from 1:1 (identical) to 21:1 (black on white). WCAG asks for at least 4.5:1 for body text and 3:1 for large text at level AA, and 7:1 and 4.5:1 respectively at level AAA.

Why is my HSL value slightly different from another tool's?

Rounding. HSL stores hue in degrees and saturation and lightness as percentages, and most tools round them for display. Converting the rounded values back to RGB can shift a channel by one. This page rounds only the displayed strings and keeps full precision internally, so its round-trips land on the same HEX code.

Is CMYK here the same as my printer's?

No, and no on-screen converter can be. This uses the standard arithmetic conversion from RGB, which ignores ink, paper and the printer's colour profile. Treat it as a starting point and always trust a proof over a screen.

How does alpha work in HEX?

An eight-digit HEX code appends a two-digit alpha byte, so `#ff000080` is red at about 50% opacity. Four-digit codes are the shorthand version, where `#f008` expands to `#ff000088`. Both are supported here and in every current browser.

What are tints, shades and analogous colours?

A tint mixes a colour with white and a shade mixes it with black, which is the simplest way to build a scale from one brand colour. Analogous colours sit 30 degrees either side on the colour wheel, triadic colours 120 degrees apart, and the complementary colour directly opposite at 180 degrees.

Does a translucent colour have a contrast ratio?

Not on its own. A ratio is only defined between two opaque colours, so the checker composites your colour over the background first and measures the flattened result. Change the background and the ratio changes with it.

Related tools

Last reviewed: