This free color converter turns one color into every format you need. Type a HEX code like #FF416C and the color converter shows the same color as RGB, as HSL and as CMYK, all at once. Or type the RGB numbers or the HSL numbers and it works backwards to the HEX code. Pick a color with the color picker and the preview swatch shows it live, or tap a color from this site’s own palette and copy its HEX code in one click.
It is built for designers, Canva users and anyone pasting colors between tools — the color you need is always one format away from the color you have. No sign-up, nothing uploaded, and the calculation runs in your browser.
The KhiyaleeGFX site palette. Tap a color to see all its formats and copy its HEX code.
HEX, RGB and HSL are three ways of writing the same color. HEX is a six-digit code, RGB is three numbers from 0 to 255, and HSL is a hue from 0 to 360 with saturation and lightness as percents. This tool converts color formats only — it does not check contrast. To check whether text is readable on a background, use the Color Contrast Checker. HSL values are rounded whole numbers, so converting back and forth can shift an RGB value by 1.
How to Use the Color Converter
- “HEX, RGB & HSL” is the main mode: type a HEX code like #FF416C and click Convert from HEX. The color converter shows the RGB numbers, the HSL numbers and the CMYK numbers for that color, all at once.
- The other way round works too. Type the red, green and blue numbers (each from 0 to 255) and click Convert from RGB. Or type the hue (0 to 360), the saturation (0 to 100%) and the lightness (0 to 100%) and click Convert from HSL. Every direction gives you all four formats.
- “Pick a color” opens your device’s own color picker. Pick any color and the preview swatch shows it, with all its formats underneath. This is the fastest way when you can see the color but do not know its code.
- “Site palette” holds the five colors this site is built on: the magenta pink #FF416C, the orange red #FF4B2B, the ink #1E293B, the soft background #F0F5FA and white #FFFFFF. Tap one to see all its formats and copy its HEX code.
- Copy the HEX code first, because that is the one most tools want. A HEX code is a single short string you can paste into CSS, Canva, Figma or any design tool — no spaces, no commas, no brackets.
HEX, RGB and HSL — What Each One Means
HEX is the code you see most often: a # sign followed by six digits, like #FF416C. The six digits are three pairs, one pair per color channel: FF is red, 41 is green, 6C is blue. Each pair is a hexadecimal number, which is just base 16 — the digits run 0 to 9 and then A to F, where A is 10 and F is 15. So FF means 15 × 16 + 15, which is 255. The # sign is only a marker that says “a color code follows” — the color converter accepts a code with or without it.
RGB is the same three numbers written plainly: rgb(255, 65, 108). Each number runs from 0 to 255, and it is how screens actually make color — by mixing red, green and blue light. Full red with no green or blue is pure red. All three at 255 is white, all three at 0 is black. If you have ever opened a color picker in an app and seen three sliders, those sliders are RGB. MDN’s guide to the CSS color type explains the same formats this page uses, so the numbers agree wherever you check them.
HSL describes a color the way people think about it, not the way screens build it. Hue is the position on the color wheel, from 0 to 360 degrees: 0 is red, 120 is green, 240 is blue, and 360 is red again. Saturation is how pure the color is, from 0% (grey) to 100% (full color). Lightness is how close the color is to black or white, from 0% (black) through 50% (the full color) to 100% (white). The site’s pink #FF416C has a hue of 346 degrees — almost red — a saturation of 100% and a lightness of 63%.
CMYK is the print format: cyan, magenta, yellow and black, each as a percent. The converter shows it for every color, because designers often need it for print work. But remember that a screen color and a printed color never match exactly — a bright screen pink like #FF416C cannot be printed in full, because print ink is duller than screen light. Use the CMYK numbers as a starting point for print, not as a promise.
Converting by Hand — the Maths Behind the Tool
HEX to RGB by hand is simple once you know the pairs. Split #FF416C into FF, 41 and 6C. Each pair is a hexadecimal number: FF is 15 × 16 + 15, which is 255. 41 is 4 × 16 + 1, which is 65. 6C is 6 × 16 + 12, which is 108. So #FF416C is RGB (255, 65, 108). The letters A to F are just the numbers 10 to 15, and every pair works the same way.
RGB to HSL by hand is longer, and it is the reason this tool exists. First find the biggest and the smallest of the three RGB numbers. Lightness is the average of the two, scaled to a percent. Saturation and hue follow from how far apart the numbers are, and from which channel is the biggest. For #FF416C the biggest is red at 255 and the smallest is green at 65, and the maths gives a hue of 346 degrees, a saturation of 100% and a lightness of 63%. Nobody does this by hand every day — but knowing the steps helps you read the numbers the tool gives you.
The short HEX form is the one that trips people up. A three-digit code like #F0A is short for #FF00AA — each digit is doubled, not padded with zeros. So #F0A is RGB (255, 0, 170) and HSL (320°, 100%, 50%). If you read #F0A as #F0A000 you get a completely different color, a dark olive instead of a bright magenta. The converter expands three-digit codes the right way, every time.
| HEX | RGB | HSL |
|---|---|---|
| #FF416C | (255, 65, 108) | (346°, 100%, 63%) |
| #1E293B | (30, 41, 59) | (217°, 33%, 17%) |
| #FF4B2B | (255, 75, 43) | (9°, 100%, 58%) |
| #F0F5FA | (240, 245, 250) | (210°, 50%, 96%) |
| #FF0000 | (255, 0, 0) | (0°, 100%, 50%) |
| #000000 | (0, 0, 0) | (0°, 0%, 0%) |
One honest detail about rounding. HSL values on this page are rounded to whole numbers, so converting there and back can shift an RGB value by 1. The pink #FF416C is HSL (346°, 100%, 63%), and converting that HSL back gives RGB (255, 66, 110), which is #FF426E — one unit off in green and blue. That is normal rounding, not a bug, and the difference is far too small for any eye to see. The HEX and RGB numbers are always exact; only the HSL round trip can move by 1.
Where Each Format Is Used
HEX rules the web. CSS, HTML, design tools and Canva all take HEX codes, because a HEX code is one short string with no spaces or commas — easy to copy, easy to paste, easy to store in a brand guide. When a designer sends you a color, nine times out of ten it arrives as HEX. If you only remember one format, remember this one.
RGB is what screens and code use under the surface. CSS has an rgb() function, image editors show RGB sliders, and every color picker in every app is really an RGB picker with a HEX label on top. When a tool asks for “red, green, blue” as three separate numbers, it wants RGB. The numbers are the same ones hiding inside the HEX code — just written out in full.
HSL is the designer’s friend, because it changes colors the way a designer thinks. Want the same color lighter? Raise the lightness and the hue stays put. Want it softer? Lower the saturation and the color family never changes. That is why palette tools and design apps show HSL sliders next to the color wheel: one slider moves the color around the wheel, one makes it purer, one makes it lighter or darker. HEX and RGB cannot do that without maths.
CMYK belongs to print. A printer mixes cyan, magenta, yellow and black ink, so print shops ask for CMYK values. The converter shows them for every color, but treat them as a guide: screens make color with light and printers make it with ink, and ink can never be as bright as light. A neon screen color will always print duller than it looks on your phone.
Common Mistakes When Copying Colors
The first mistake is the missing # sign. Some tools accept FF416C without it and some refuse it, so always copy the code with the # sign included. This converter accepts both, but the tools you paste into may not.
The second mistake is the three-digit trap. #F0A is #FF00AA, not #F0A000 and not #F0A0A0. Each digit doubles: F becomes FF, 0 becomes 00, A becomes AA. If a color looks wrong after you paste it, check whether you expanded a short code the wrong way.
The third mistake is the hue range. Hue runs from 0 to 360 and wraps around, so 0 degrees and 360 degrees are both red. A hue of 400 is not a color at all — the converter will tell you it is out of range. The same goes for RGB: each number stops at 255, and 256 is not a color either.
The fourth mistake is mixing up lightness with brightness. In HSL, 50% lightness is the full color, 100% is white and 0% is black, whatever the hue. HSB and HSV use a different idea called brightness or value, where 100% is the full color. They look similar and they are not the same system — do not paste an HSL lightness number into an HSV brightness box.
The fifth mistake is pasting the wrong format into the wrong box. A field that expects HEX will not understand rgb(255, 65, 108), and a field that expects RGB will not understand #FF416C. Check what the box wants first, then convert — that is the whole job of this page.
What This Tool Does Not Do
This page converts color formats only. It does not check whether text is readable on a background — for that, use the Color Contrast Checker, which gives you the WCAG contrast ratio and the AA and AAA pass results. It does not invent new colors for you — for that, use the Color Palette Generator. It does not build gradients — for that, use the Gradient Generator. It converts the color you type in, nothing more — and that is the whole point, because a tool that tries to do everything usually does none of it well.
Frequently asked questions
How do I convert HEX to RGB? Type the HEX code into the color converter above and click Convert from HEX. #FF416C becomes RGB (255, 65, 108), with the HSL and CMYK values shown underneath.
What is the difference between HEX and RGB? They are the same color written two ways. HEX is one short code, like #FF416C. RGB is the same three numbers written out, like (255, 65, 108). The converter turns one into the other instantly.
What does HSL mean? Hue, saturation and lightness. Hue is the position on the color wheel from 0 to 360 degrees, saturation is how pure the color is, and lightness is how close it is to black or white. #FF416C is HSL (346°, 100%, 63%).
Why does converting back give a slightly different color? Because HSL values are rounded to whole numbers. #FF416C converts to HSL (346°, 100%, 63%), and converting that back gives RGB (255, 66, 110), which is #FF426E — one unit off in green and blue. The difference is too small to see, and the HEX and RGB numbers are always exact.
Can I convert CMYK to HEX? The converter shows the CMYK values for every color you enter, but there is no CMYK input box — CMYK is a print format, and this tool starts from screen colors (HEX, RGB and HSL). If you have a printed color, match it on screen first, then read the HEX code from here.
Related tools
Color Contrast Checker · Percentage Calculator · Date Calculator

