HEX to RGB Converter – Free Color Code Converter With CMYK
Convert HEX to RGB and back, and every other common color code too. Type a color in any format, such as #ff5733, rgb(255 87 51), hsl(11 100% 60%), cmyk(0 66 80 0), or a CSS name like tomato, and this free color code converter shows HEX, RGB, HSL, HSV, CMYK, CIELAB, and OKLCH at once. Each value has a copy button, and you also get the closest color name, the text contrast, and a converter for whole lists of colors.
How to Use the Color Code Converter
- Enter a color. Type or paste it into “Enter any color code”. The converter recognizes the format by itself and tells you how it read your input, for example “Read as HSL”.
- Or edit one format directly. Change a number in the RGB, HSL, HSV, or CMYK fields, or type a HEX code. All other formats update while you type.
- Or pick visually. “Pick a color” opens your system color picker, and “Random” gives you a surprise color.
- Copy what you need. Every format has its own copy button. The code is copied in a form you can paste straight into CSS, a design app, or a document.
- Convert many colors at once. Paste a list into “Convert a list of colors”, choose the output format, and copy the result or download it as a CSV file.
The large swatch shows the current color with its HEX code and its name. “Recent colors” keeps the last ten colors of your visit, so you can jump back with one click.
Which Color Codes Can You Enter?
The input field understands the notations that designers, developers, and painters actually use:
| Format | Examples you can type |
|---|---|
| HEX | #ff5733, ff5733, #f53, 0xff5733, #ff573380 (with alpha) |
| RGB | rgb(255, 87, 51), rgb(255 87 51), rgba(255, 87, 51, 0.5), 255 87 51 |
| HSL | hsl(11, 100%, 60%), hsl(11 100% 60%), hsla(11, 100%, 60%, 0.5) |
| HSV / HSB | hsv(11, 80%, 100%), hsb(11 80 100) |
| CMYK | cmyk(0, 66, 80, 0), cmyk(0% 66% 80% 0%), 0 66 80 0 |
| Color names | tomato, rebeccapurple, Alice Blue, and more than 2,300 other named colors |
Three plain numbers are read as RGB, four plain numbers as CMYK. Commas, spaces, and slashes all work as separators, and you can write color names with or without spaces.
How HEX to RGB Conversion Works
A HEX code is simply an RGB color written in the base 16 number system. The six digits after the # are three pairs: red, green, and blue. Each pair runs from 00 to FF, which is 0 to 255 in everyday decimal numbers.
Take #FF5733 as an example:
- FF for red = 15 × 16 + 15 = 255
- 57 for green = 5 × 16 + 7 = 87
- 33 for blue = 3 × 16 + 3 = 51
So #FF5733 is rgb(255, 87, 51). RGB to HEX works the other way: divide each value by 16, the whole number is the first digit and the remainder is the second, with 10 to 15 written as A to F. A three-digit short code like #F53 doubles each digit and means #FF5533. An eight-digit code adds a fourth pair for opacity, where FF is fully opaque and 80 is about 50%.
Because HEX and RGB describe exactly the same 16.7 million screen colors, this conversion is always exact. That is not true for every format, as the next sections show.
RGB to CMYK and CMYK to RGB
RGB mixes light on a screen, starting from black. CMYK mixes cyan, magenta, yellow, and black ink on white paper, so it subtracts light instead of adding it. The converter uses the standard formula that most online tools use:
- Divide R, G, and B by 255 to get values from 0 to 1.
- K (black) = 1 minus the largest of the three values.
- C = (1 − R − K) ÷ (1 − K), and the same for M with G and Y with B.
For #FF5733 this gives cmyk(0%, 66%, 80%, 0%). CMYK to RGB reverses it: R = 255 × (1 − C) × (1 − K), and so on for G and B.
An important limit: this formula knows nothing about real paper and ink. A print shop converts with an ICC color profile, for example GRACoL or SWOP for many US presses and FOGRA in Europe. The profile describes how its inks behave on its paper, so the CMYK numbers it uses can differ noticeably from the simple formula. Bright screen colors such as pure blue or neon green also lie outside what CMYK ink can print and come out duller. Use the converted CMYK values as a starting point and ask your printer which profile to use. If you sell art prints, our guide on how to make and sell prints of your art explains the rest of the process, and our article on the giclee print covers fine art reproduction.
The converter does not show Pantone numbers. Pantone is a proprietary color system, and its official values come from Pantone’s own guides and licensed software.
HSL and HSV Explained
HSL and HSV describe the same RGB colors in a way that is closer to how artists think about color.
- Hue (H) is the position on the color wheel from 0° to 360°: red at 0°, yellow at 60°, green at 120°, cyan at 180°, blue at 240°, and magenta at 300°. Our interactive color wheel shows these positions and the harmonies between them.
- Saturation (S) is how pure or how gray the color is.
- Lightness (L) in HSL runs from black at 0% to white at 100%, with the purest color at 50%.
- Value (V) in HSV, also called brightness (B) in HSB, runs from black at 0% to the full color at 100%.
HSL is the format of CSS, while HSV and HSB are what you find in the color pickers of Photoshop, Procreate, and many other apps. Since the converter rounds HSL and HSV to whole numbers, converting back can move a channel by one step: hsl(11, 100%, 60%) is #FF5833, very close to but not exactly #FF5733. If you need an exact match, copy the HEX or RGB value.
More Formats for Designers and Developers
Under “More formats” you find:
- HEX with alpha, RGBA, and HSLA, which use the opacity slider.
- RGB percent and RGB from 0 to 1, as used by some design apps, shaders, and game engines.
- CIELAB, written the way CSS lab() expects it, with the D50 white point. Its L value is a good measure of the perceived lightness of a color.
- OKLCH, a newer CSS format that keeps steps in lightness and chroma visually even, which makes it popular for design systems.
- Decimal, the color as a single number, as some spreadsheets and programming tools store it.
Color Names, Contrast, and the Complementary Color
For every color, the converter checks two name lists. The first is the 148 named colors of CSS, such as tomato, teal, or rebeccapurple. If your color matches one exactly, you can copy the keyword. The second is a list of more than 2,300 color names, from Absolute Zero to Zomp. The converter finds the closest one with the ΔE color difference, the distance between two colors in CIELAB, and tells you how close it is. A ΔE below 2 is barely visible to most people, while a ΔE above 10 means the colors only look roughly alike. Three more close names follow, and you can click them to load that color. For a deeper search, try our color name finder.
“Text on this color” compares white and black text with the WCAG contrast formula. A ratio of 4.5:1 or more passes level AA for normal text, which is what you need for readable buttons, labels, and posters.
“Complementary color” turns the hue by 180° on the RGB color wheel and keeps saturation and lightness. Painters often mix complementary colors on a different wheel with red opposite green, as our article on complementary colors explains, so treat this value as the screen complement.
Convert a Whole List of Colors
Paste one color per line, in any of the supported formats, even mixed. Choose HEX, RGB, HSL, HSV, CMYK, or “All formats” and click Convert. Lines that are not colors are marked instead of skipped, so you see at once what went wrong. “Download CSV” saves a spreadsheet with the original input, HEX, RGB, HSL, HSV, CMYK, and the closest color name for every line. This is handy for a brand style guide, a paint inventory, or a palette from our color palette generator.
Tips for Artists Working With Color Codes
- Getting codes from a painting or photo: our image color picker reads the code of any pixel in an image. Paste that code here to get every other format.
- Screen colors are not paint colors. A HEX code describes light on a screen. To find out which tube colors come close, use our color mixer.
- Light and dark versions: to build a value scale from one color, use the tint and shade generator.
- Know your basics: hue, value, and saturation are explained step by step in our guide to basic color theory.
- Print a color card. “Print color card” makes a page with a large swatch and all codes, useful to compare a print proof or a paint swatch with the screen color.
Privacy
All conversions happen in your browser. Nothing you type is sent to a server or stored. The recent colors list is cleared when you leave the page.
More Free Art Tools
All our tools are free, run in your browser, and need no account. See them all on the free art tools page.
- Image color picker: find the exact colors in any photo or painting.
- Color name finder: get the name of any HEX, RGB, or photo color.
- Color wheel: find complementary, triadic, and analogous colors.
- Color mixer: mix paint or screen colors and find paint recipes.
- Color palette generator: create matching color schemes or a palette from an image.
- Random color generator: get random colors and palettes with paint mixing tips.
- Tint and shade generator: make tints, shades, and tones of any color.
- Color blindness simulator: see images and palettes as color blind people do.
- Photo to painting: turn a photo into an oil or watercolor painting.
- Photo to sketch: turn a photo into a pencil sketch or line art.
- Photo to coloring page: turn any picture into a printable coloring page.
- Image to pixel art: convert an image into editable pixel art.
- Pixel art maker: draw pixel art on a grid and print it as a pixel pattern.
- Notan generator: plan light and dark shapes with a two- or three-value study.
- Art grid tool: put a drawing grid over any photo.
- Pose reference: practice figure drawing with timed poses.
- Graph Paper Printable: print graph paper, dot grid, isometric, and hex paper to scale.
- Aspect Ratio Calculator for Art: work out aspect ratios and scale art to any canvas size.
- Tracing Worksheets: make tracing worksheets with letters, numbers, and lines.
- DPI Calculator: find the DPI and largest print size of any image.
- Calligraphy Practice Sheets: print calligraphy and hand lettering practice sheets.
- Art Style Quiz: find out which art style fits you.
- Cursive font generator: turn text into cursive letters to copy or download.
- Gothic font generator: write in blackletter and Old English letters.
- Online drawing board: draw and paint online with brushes, layers, and symmetry.
- Golden ratio overlay: check your composition with a golden spiral and rule of thirds.
- Perspective grid generator: print one-, two-, and three-point perspective grids.
- Paint by number generator: turn a photo into a printable paint by number template.
- Mandala maker: draw symmetrical mandalas and print them as coloring pages.
- Connect the dots maker: turn a picture into a printable dot to dot worksheet.
- Picture frame and mat size calculator: work out mat openings and frame sizes for your art.
- Art pricing calculator: find a fair price for your paintings and prints.
- Art quiz: guess famous paintings, artists, and styles.
- Art prompt generator: get random ideas for drawing and painting.
- Random character generator: create an original character with traits and a palette.
Frequently Asked Questions
How Do I Convert HEX to RGB?
Split the six HEX digits into three pairs and convert each pair from base 16 to a number from 0 to 255. #FF5733 becomes FF = 255, 57 = 87, and 33 = 51, so rgb(255, 87, 51). The converter above does this instantly as you type.
How Do I Convert RGB to HEX?
Convert each of the three numbers to a two-digit base 16 value and write them after a #. For example, rgb(37, 44, 84) becomes #252C54. Enter the RGB values above and copy the HEX code.
Is RGB to CMYK Conversion Accurate?
It is an approximation. The simple formula has no color profile, while printers convert with an ICC profile that matches their inks and paper. Bright screen colors may also fall outside the range CMYK inks can print. Ask your print shop for its profile when color accuracy matters.
What Is the Difference Between HSL and HSV?
Both use hue and saturation. HSL adds lightness, where 100% is always white. HSV adds value, also called brightness, where 100% is the full, brightest version of the color. The same color therefore has different S values in the two systems.
What Is an 8-Digit HEX Code?
It is a HEX color with a fourth pair for opacity (alpha). #FF573380 is the color #FF5733 at about 50% opacity. Use the opacity slider to create one.
Can I Convert a Color Name to HEX?
Yes. Type a CSS color name like tomato or a name from our list like Space Cadet, and the converter shows its HEX, RGB, and all other codes.
Does the Converter Show Pantone Colors?
No. Pantone is a proprietary color system, and its official values are available only through Pantone’s own guides and licensed software. The converter covers the open formats HEX, RGB, HSL, HSV, CMYK, CIELAB, and OKLCH.
Can I Convert Many Colors at Once?
Yes. Paste a list into “Convert a list of colors”, one color per line. You can copy the converted list or download a CSV file with all formats and the closest color names.
Cite this Article
artincontext, , “HEX to RGB Converter – Free Color Code Converter With CMYK.” Art in Context. November 16, 2026. URL: https://artincontext.org/hex-to-rgb-converter/
, a. (2026, 16 November). HEX to RGB Converter – Free Color Code Converter With CMYK. Art in Context. https://artincontext.org/hex-to-rgb-converter/
, artincontext. “HEX to RGB Converter – Free Color Code Converter With CMYK.” Art in Context, November 16, 2026. https://artincontext.org/hex-to-rgb-converter/.







