Skip to content
  • Image CompressorImage Tools · Make photos and graphics smaller by re-encoding them as JPG or WebP, with a quality slider and optional downscaling.
  • Image ResizerImage Tools · Change the width and height of an image in pixels or by percentage, with high-quality downscaling.
  • Image ConverterImage Tools · Change the format of one or many images to JPG, PNG or WebP, with control over quality and transparency.
  • Image CropperImage Tools · Cut out part of an image with a draggable selection, aspect ratio presets and exact pixel inputs.
  • Rotate & Flip ImageImage Tools · Turn a picture by 90° or 180° and mirror it horizontally or vertically, with a live preview.
  • EXIF Viewer & RemoverImage Tools · View the EXIF data in a photo – camera, date and location – and remove all of it or only the GPS position, without losing quality.
  • HEIC to JPGImage Tools · Turn HEIC and HEIF photos from iPhones and iPads into JPG or PNG files that open everywhere.
  • Blur & Pixelate ImageImage Tools · Hide faces, names, number plates and other details in a photo with pixelation, blur or a solid box.
  • Favicon GeneratorImage Tools · Make a complete favicon set – ICO, PNG icons and web manifest – from an image, text or an emoji.
  • Image MergerImage Tools · Put several pictures together in one image: side by side, one above the other or in a grid, with an optional gap and background.
  • Merge PDFPDF Tools · Combine several PDF files into one document, in the order you choose, with optional page ranges per file.
  • Split PDFPDF Tools · Extract pages into a new PDF or split a document into several files by page, range or fixed page count.

Color Code Converter

Turn a HEX, RGB or HSL color into the other two formats and check whether two colors have enough contrast for readable text.

Runs locally in your browser – your data is not uploaded

Loading tool…

About the Color Code Converter

The color code converter turns a color into all three common web formats: HEX (#FF8800), RGB (rgb(255, 136, 0)) and HSL (hsl(32, 100%, 50%)). Type a code in any of them, or pick a color, and copy the format you need for CSS, a design tool or code.

It also checks contrast. Enter a text color and a background color to see their WCAG contrast ratio and whether they pass the AA and AAA levels for normal and large text, so your text stays readable for everyone.

Everything runs in your browser; nothing you type is sent anywhere.

How to use it

  1. Type a color code such as #777, rgb(0 128 255) or hsl(120, 50%, 50%), or use the color picker.
  2. Read the color in HEX, RGB and HSL next to its preview.
  3. Press Copy next to the format you want.
  4. For contrast, enter a text color (or leave it empty to use the color above) and a background color.
  5. Read the contrast ratio and the AA and AAA results for normal and large text.

Features

  • HEX, RGB and HSL: Reads short and long HEX, rgb() and hsl() with commas or spaces, and three plain numbers.
  • Color picker: Choose a color visually and get its codes at once.
  • Contrast ratio: The WCAG 2 contrast ratio of any two colors, from 1:1 to 21:1.
  • AA and AAA: Pass or fail for normal and large text at both levels.
  • Clear errors: Says which part of a code is wrong, such as a red value above 255.

Examples

Gray on white

#777777 on white has a ratio of 4.48:1: it passes AA only for large text.

Brand color

#1E3A8A is hsl(224, 64%, 33%); white text on it easily passes AAA.

From a design tool

Paste 255, 136, 0 to get #FF8800 and hsl(32, 100%, 50%).

Limitations and notes

  • Colors with transparency (alpha), such as #FF000080 or rgba(), are not supported.
  • Color names (red, blue), CMYK, LAB and other color spaces are not converted.
  • HSL values are rounded to whole numbers, so converting back can move a channel by a few steps.
  • The contrast check follows WCAG 2.x; it does not judge font weight, size or colour blindness for you.

Frequently asked questions

How do I convert HEX to RGB?

Type the HEX code, for example #FF8800, and read rgb(255, 136, 0) below it. Press Copy to use it.

What contrast ratio do I need?

WCAG AA asks for 4.5:1 for normal text and 3:1 for large text; AAA asks for 7:1 and 4.5:1.

What counts as large text?

Text of at least 24 px, or at least 18.66 px in bold.

Can I enter #RGB codes?

Yes. Short codes like #777 are read as #777777.

Is anything sent to a server?

No. All conversions and checks happen in your browser.

More free tools