Color Converter (HEX, RGB, HSL, CMYK)

Convert colours between HEX, RGB, HSL and CMYK. Colour picker and shades. Free.

50 free uses every 24 hoursUnlimited with Pro →

Private by design — your data stays on your deviceEverything runs right here in your browser. What you type is not sent to our server and is not stored.
  • Runs in your browser
  • Not stored
  • No sign-up

This color converter changes a colour code between HEX, RGB, HSL and CMYK. Type a value or choose a colour with the picker, and you get every other format at once, plus a row of lighter and darker shades. It is free and made for web designers, developers, students and anyone who has a colour in one format and needs it in another.

How to use the color converter

  1. Enter a colour. Type a code in any of the four formats, or click the colour picker and choose a shade by eye.
  2. Check the results. The HEX, RGB, HSL and CMYK values appear together, so you can compare them.
  3. Look at the shades. A row of lighter and darker versions of your colour appears below the result.
  4. Copy what you need. Copy any single format and paste it into your stylesheet, design file or document.
How to use the Color Converter on OneHubTools: 4 steps with a real screenshot of the tool
How to use the Color Converter, step by step.

This tool pairs well with the Color Picker from Image. If you do this kind of job often, the CSS Gradient Generator and the CSS Box Shadow Generator can save you time too.

Nothing is uploaded. The conversion happens in your browser.

What do HEX, RGB, HSL and CMYK mean?

All four describe the same colour in different ways. Each one suits a different job.

FormatWhat it looks likeBest for
HEX#3366CCWeb pages, CSS, design tools
RGBrgb(51, 102, 204)Screens, code, adding transparency
HSLhsl(220, 60%, 50%)Adjusting brightness or saturation by hand
CMYKabout 75, 50, 0, 20Print, brochures, packaging

HEX and RGB are two ways of writing the same red, green and blue mix. HSL describes hue, saturation and lightness, which is easier to reason about. CMYK uses ink: cyan, magenta, yellow and black.

Result from the Color Converter on OneHubTools
What the Color Converter gives you.

What is a color converter good for?

  • HEX to RGB for CSS. A brand guide gives you a HEX code, but you want rgb() so you can add transparency.
  • RGB to HSL for tweaking. Changing the lightness number is much easier than guessing new red, green and blue values.
  • HEX to CMYK for print. You have a web colour and need a starting point for a flyer or business card.
  • Building a palette. The lighter and darker color shades give you quick options for hover states, borders and backgrounds.
  • Matching a colour. Use the color picker when you only have a rough idea, then copy the exact code.

Example: one colour in four formats

Pure red is a good test. In HEX it is #FF0000. In RGB it is rgb(255, 0, 0). In HSL it is hsl(0, 100%, 50%). In CMYK it is 0, 100, 100, 0.

Now try a softer blue such as #3366CC. The same colour reads as rgb(51, 102, 204) and hsl(220, 60%, 50%). Raise the lightness in HSL and you get a paler blue without touching the hue.

Tips for better results

  • Start with the format you already have. Paste it in as it is, then copy the one you need.
  • Use HSL for variations. Keep the hue the same and change only lightness or saturation to stay on brand.
  • Treat CMYK as a guide. Screens and printers produce colour differently, so a printed result can look duller than your monitor. Ask your printer for a proof if the colour matters.
  • Copy exact values. Retyping a code by hand is where most mistakes happen.
  • Check contrast. If you use a lighter or darker shade for text, view it against its background before you commit.

Common problems and how to fix them

My printed colour looks different from the screen

This is normal. A screen mixes light, while a printer mixes ink, and CMYK cannot match every bright screen colour. Use the CMYK value as a starting point and test a small print first.

The HEX code does not seem to work

Check for a missing character or a stray letter. A standard HEX code has a # followed by letters and numbers from 0 to 9 and A to F. Anything else is not a valid code.

Two tools give slightly different numbers

Small differences usually come from rounding. A value of 50% in one tool may show as 49.8% in another. The colours look the same to the eye.

Why use this tool instead of converting by hand?

You can work out HEX to RGB on paper, but it is slow and easy to get wrong. This page gives you all four formats and a set of shades in one step. It is also free, and your colour values stay in your browser.

Limits and specs

PriceFree
Free use50 uses every 24 hours — shared with 178 other tools in the “Basic tools” group
Where it runsIn your browser
Sign-upNot needed
Muhammad Shahwaiz Gillani
Maintained and reviewed by Muhammad Shahwaiz GillaniSoftware engineer and founder of OneHubTools · Last reviewed

How we checked it: We tested it in Chrome with real code and data, including edge cases such as empty input and very long values.

Where the facts come from

According to MDN Web Docs, colours on the web can be written as hex codes, RGB or HSL values, and a six-digit hex code can describe more than 16 million colours.

Spotted a mistake or the tool did not work for you? Tell us and we will fix it.

Rate this tool

Ratings come only from signed-in users, so every rating is verified.

Only signed-in users can rate tools, so every rating shows a ✔ Verified badge.Sign in to rate

Frequently asked questions

How do I convert HEX to RGB?

Type or paste your HEX code into the color converter and the RGB value appears straight away. Copy it from the results and paste it where you need it.

Can I convert RGB to HSL here?

Yes. Enter your RGB values and the HSL version is shown with HEX and CMYK. You can then copy whichever format you need.

Is the CMYK value exact for printing?

No, treat it as a close starting point. Screens and printers reproduce colour differently, so a printed colour can look slightly different. A test print or proof from your printer is the safest check.

What are the lighter and darker shades for?

They show variations of your colour so you can pick tints and tones that go together. Designers often use them for buttons, hover states, borders and backgrounds.

Can I use the color picker instead of typing a code?

Yes. Choose a colour with the picker and the tool shows its HEX, RGB, HSL and CMYK values. This helps when you do not know the code yet.

Is this color converter free, and is my data safe?

Yes, it is free to use. Conversion happens in your browser, so nothing you enter is uploaded.