Shiklo Tools
PDF40
Image20
Calculators & Converters25
Text & Writing13
Developer26
Video14
Audio14
Document14
Data & Spreadsheet12
Web & SEO9
OCR & Scanning5
Archive & File12
Security & Privacy23
Health & Medical29
QR & Barcode5

Color Converter

Convert colors between HEX, RGB, HSL, HWB, OKLCH, Lab and CMYK in any direction, check WCAG contrast and get tints and shades.

Type a color in any format and see it in all the others at once: HEX, RGB, HSL, HWB, OKLCH, OKLab, Lab, LCH and CMYK, plus its CSS name or the nearest one. Every format is also an input, so you can paste an HSL value from a stylesheet, an OKLCH value from a design system or CMYK values from a print brief and convert in any direction. You can also use the color picker.

Below the conversions, a contrast checker tells you whether text in your color is readable on a background, using the WCAG ratios that accessibility audits use, and a palette of 11 tints and shades from 50 to 950 helps you build a full color scale. Everything runs in your browser.

How to use Color Converter

  1. Type or paste a color in any format, or click the swatch to pick one.
  2. Copy the format you need; or edit any row to convert from that format.
  3. Enter a background color to check the contrast ratio and WCAG levels.
  4. Click a tint or shade to use it, or copy all of them as CSS variables.

Features

  • HEX (3, 6 and 8 digits), RGB, HSL, HWB, OKLCH, OKLab, Lab, LCH and CMYK.
  • Every row is editable: convert from any format to all others.
  • Accepts hex without #, plain 255, 0, 0 and all 148 CSS color names.
  • Transparency kept in HEX8, rgba and the modern slash syntax.
  • WCAG contrast ratio with AA and AAA results for normal and large text.
  • 11 tints and shades (50–950) built in OKLCH; copy as CSS variables.
  • Nearest CSS color name; warning for colors outside sRGB.
  • Shareable link with the color.

Common colors in every format

These are a few well-known colors converted by the tool. HEX is a compact way of writing the red, green and blue values in base 16, so ff means 255.

ColorHEXRGBHSLCMYK
Red#ff0000rgb(255, 0, 0)hsl(0, 100%, 50%)0%, 100%, 100%, 0%
Orange#ffa500rgb(255, 165, 0)hsl(38.8, 100%, 50%)0%, 35%, 100%, 0%
Navy#000080rgb(0, 0, 128)hsl(240, 100%, 25.1%)100%, 100%, 0%, 50%
Gray#808080rgb(128, 128, 128)hsl(0, 0%, 50.2%)0%, 0%, 0%, 50%
White#ffffffrgb(255, 255, 255)hsl(0, 0%, 100%)0%, 0%, 0%, 0%
Black#000000rgb(0, 0, 0)hsl(0, 0%, 0%)0%, 0%, 0%, 100%

Which color format should I use?

HEX and RGB describe the amounts of red, green and blue light and are understood everywhere. HSL and HWB describe hue, saturation and lightness, which is easier to adjust by hand. OKLCH is the modern choice in CSS: its lightness matches how bright colors look to people, so two colors with the same L value really look equally light, and changing the hue does not make a color suddenly darker as it does in HSL. It can also describe the brighter colors of wide-gamut screens. Lab and LCH are older perceptual spaces used in print and color science. CMYK describes ink for printing.

Contrast and accessibility (WCAG)

The Web Content Accessibility Guidelines compare the relative brightness of text and background as a ratio from 1:1 (no contrast) to 21:1 (black on white). Level AA requires at least 4.5:1 for normal text and 3:1 for large text (24 px, or 18.66 px bold) and for icons and form borders. Level AAA requires 7:1 and 4.5:1. For example, the gray #767676 on white has a ratio of 4.54:1 and passes AA, while the slightly lighter #777777 has 4.47:1 and fails. The checker rounds the ratio down, as audits do, so a pass here is a real pass.

Tints, shades and color scales

Design systems such as Tailwind CSS use scales from 50 (almost white) to 950 (almost black) for each color. The palette here keeps the hue of your color in OKLCH and steps the lightness evenly from 97% down to 24%, reducing the colorfulness near white and black so the light tints don't look washed out and the dark shades don't look muddy. Colors that would fall outside what screens can show are brought back into range. Copy the scale as CSS custom properties, such as --color-500, and paste it into your stylesheet.

About CMYK values

Screens mix light (RGB) while printers mix inks (CMYK), and the exact ink amounts depend on the paper, the printer and the color profile used. This tool uses the standard simple formula, which is fine for a starting point and for design tools that expect it, but a professional print job should be converted with the printer's ICC profile. Bright screen colors, especially vivid greens and blues, often can't be printed exactly.

Frequently asked questions

How do I convert HEX to RGB?

Paste the HEX code, such as #ff8800, into the color box. The RGB row shows rgb(255, 136, 0) and every other format at the same time.

How do I convert RGB to HEX?

Type the RGB value, for example rgb(37, 99, 235) or just 37, 99, 235, and copy the HEX row: #2563eb.

What is OKLCH?

A CSS color format with lightness, chroma (colorfulness) and hue that matches how people see brightness. It is supported in all modern browsers.

What contrast ratio do I need for text?

At least 4.5:1 for normal text and 3:1 for large text to meet WCAG level AA; 7:1 and 4.5:1 for level AAA.

Can I convert colors with transparency?

Yes. Use an 8-digit HEX, rgba() or the slash syntax such as rgb(0 0 0 / 50%); the alpha value is kept in every format that supports it.

Why do HEX and OKLCH show different colors for some values?

Some OKLCH and Lab colors are outside the sRGB range that HEX can store. The HEX, RGB, HSL and CMYK rows then show the nearest color a standard screen can display.

Are the CMYK values exact for printing?

They use the simple formula without a print profile. Ask your printer for their profile for exact values.

Related tools