Converters

HEX to RGB converter

Convert HEX to RGB instantly

Type any hex code and get its red, green and blue channels in one step. Use this hex to RGB converter to turn a hex color to RGB, then compare HSL, CMYK ink percentages and a live swatch — all updated as you type.

  • No submit button — converts as you type
  • 100% client-side — nothing is uploaded
  • No account

Converter

HEX to RGB and CMYK, side by side

Convert HEX to RGB, edit any channel, and see the same colour as CMYK and HSL without leaving the page.

3 or 6 digits

Enter a 3 or 6 digit hexadecimal colour, with or without the leading hash.

RGB channels — 0 to 255

Dial in a channel directly, or let it follow the HEX.

CMYK inks — edit any value

Every field is live. Change an ink and the HEX updates instantly.

0%
0%
0%
0%
Recent
Nothing yet.
Colour wheel

Hue and saturation — drag the marker, or use the arrow keys (hold Shift for larger steps).

100%
#7C3AED
HEX
#7C3AED
CMYK
cmyk(48%, 76%, 0%, 7%)
RGB
rgb(124, 58, 237)
HSL
hsl(262, 83%, 58%)

Total ink coverage

131%

Within the ~300% most commercial presses accept.

CMYK here is the standard sRGB approximation — a faithful preview, not a press-calibrated match.

HEX to RGB guide

HEX to RGB converter: read the red, green and blue behind any hex code

A hex code is compact, but it is not always useful on its own. This guide explains how to convert HEX to RGB by hand, why the maths is exact, where the three channels are used, and how to move between RGB and CMYK without losing track of the colour.

What is a HEX to RGB converter?

A HEX to RGB converter is a tool that translates a hexadecimal colour code, such as #0A84FF, into the three decimal values a screen understands: red, green and blue. The hex form packs those channels into six characters, two per channel, which makes it compact enough for a stylesheet but awkward to read at a glance. The RGB form spells each channel out as a number from 0 to 255, so it is immediately obvious how much red, green and blue the colour contains. Designers, developers and marketers use a hex to rgb converter whenever a colour has to leave a design file: pasting a brand colour into JavaScript, feeding a canvas or charting library, or handing channel values to a developer who prefers numbers over hex strings. This converter performs the translation as you type, and it keeps HSL, CMYK and a live swatch beside the RGB output so you can judge the colour from several angles at once.

How to convert HEX to RGB, step by step

Start with a full six-digit code and remove the leading hash. #FF6B35 becomes FF6B35. Split the remaining six characters into three pairs in order: red first, then green, then blue. In this example those pairs are FF, 6B and 35. Each pair is a base-16 number, so convert it to decimal by multiplying the first digit by 16 and adding the second digit, remembering that A=10, B=11, C=12, D=13, E=14 and F=15. For the red pair, FF is 15 × 16 + 15 = 255. The green pair, 6B, is 6 × 16 + 11 = 107. The blue pair, 35, is 3 × 16 + 5 = 53. Written in CSS syntax, the result is rgb(255, 107, 53). There is no rounding, no colour profile and no approximation in that calculation: every six-digit hex code maps to exactly one RGB triplet, which is why the convert hex to rgb operation is fully reversible.

The HEX to RGB formula in plain terms

If you prefer to see the arithmetic as a formula, label the six digits H1 through H6. The three channels are R = 16 × H1 + H2, G = 16 × H3 + H4 and B = 16 × H5 + H6, where each letter stands for its decimal value. A colour such as #7C3AED therefore gives R = 16 × 7 + 12 = 124, G = 16 × 3 + 10 = 58 and B = 16 × 14 + 13 = 237. Some tools also express the result as a percentage or as a decimal between 0 and 1: divide each channel by 255. That normalised form is what colour libraries, accessibility calculations and shader code often expect. Going back the other way is just as direct. Divide each channel by 16, take the whole-number quotient as the first hex digit and the remainder as the second, then join the three pairs and add the hash. Because both directions use the same integer values, a HEX to RGB conversion never drifts, even after a round trip.

A worked example: convert #FF6B35 to RGB

Take the warm orange #FF6B35. The red pair FF is the maximum, 255. The green pair 6B converts to 107, and the blue pair 35 converts to 53, so the hex color to rgb result is rgb(255, 107, 53). As a percentage that is roughly 100% red, 42% green and 21% blue. The same colour expressed in ink is approximately C 0% M 58% Y 79% K 0%, which is why the converter shows CMYK in the same panel. For a second example, the short code #F63 expands to #FF6633 before the pairs are read, giving R = 255, G = 102 and B = 51, or rgb(255, 102, 51). Notice that the shorthand is not a different colour with fewer digits; each digit is simply duplicated. Once you know that rule, three-digit codes are as easy to convert as six-digit ones.

Where RGB values are used

RGB is the native language of every pixel-emitting device, so the channel values turn up almost everywhere. In CSS they appear in rgb(), rgba() and the modern space-separated syntax, and they are the easiest way to add transparency with an alpha value. In JavaScript they feed canvas drawing commands, WebGL shaders and charting libraries that expect three separate numbers rather than a string. In SVG, channel values often replace hex fills when a graphic is generated programmatically. Image editors, video tools and game engines all expose red, green and blue controls because that is how displays mix light. RGB is also used to compute contrast: relative luminance, which decides whether text passes WCAG accessibility thresholds, is derived from the three channels after they are linearised. Even hardware fits the pattern, from LED strips addressed as three-channel values to screen calibration profiles that adjust each channel independently. A hex code is convenient for people, but RGB is what the machine actually receives.

HEX to RGB and CMYK in one workflow

Digital projects rarely stay in one colour space. A website may need RGB, a social image may need hex, and a printer may ask for CMYK, which is why a hex to rgb and cmyk workflow saves so much time. The important distinction is that HEX and RGB describe the same thing in two notations, while CMYK describes something different: ink on paper rather than light on a screen. Converting HEX to RGB is therefore lossless and exact, but converting either one to CMYK is an approximation that depends on the press, the paper and the profile being used. Keeping the RGB result beside the CMYK percentages makes that difference visible. You can confirm that the screen colour is unchanged while reading the ink breakdown, then adjust the ink values if a print vendor requests a specific total coverage. This page shows both at once, so a colour can be specified for a browser and discussed with a print supplier without opening two separate tools.

Why use this HEX to RGB converter

The converter is built for quick, repeated use rather than a single one-off calculation. Conversion happens as you type, with no submit button and no page reload, so comparing several candidates takes seconds. The RGB fields are editable: type a new channel value and the hex code, HSL readout and CMYK ink bars follow immediately, which is useful when you are tuning a colour channel by channel. The colour wheel, native picker and screen eyedropper offer a visual route to the same values, while the numeric inputs remain available when precision matters. Every calculation runs in your browser, so nothing you type, pick or paste is uploaded, logged or tied to an account. The current colour is stored in the URL, so a colleague can open exactly the same state. When you need the opposite direction, the RGB to HEX converter packs the channels back into a hex code, and the HEX to CMYK converter takes the same colour into print territory.

FAQ

HEX to RGB questions, answered

Quick answers about converting HEX to RGB, the channel formula, shorthand codes, and working with RGB and CMYK together.

How do I convert HEX to RGB?

Remove the hash, split the six digits into three pairs, and convert each pair from hexadecimal to decimal. For #0A84FF the pairs are 0A, 84 and FF, which become 10, 132 and 255, so the RGB value is rgb(10, 132, 255). Three-digit codes such as #F63 are expanded first by doubling each digit to #FF6633. This hex to RGB converter does both steps instantly as you type.

What is the HEX to RGB formula?

For six digits labelled H1 to H6, the red channel is 16 × H1 + H2, green is 16 × H3 + H4, and blue is 16 × H5 + H6, with A to F counting as 10 to 15. The result is an RGB triplet from 0 to 255. Dividing each channel by 255 gives the normalised decimal form used by colour libraries and contrast calculations.

Can I convert a 3-digit hex code to RGB?

Yes. A shorthand code such as #F63 is expanded by repeating each digit: F becomes FF, 6 becomes 66, and 3 becomes 33, producing #FF6633. Then convert the pairs normally to get rgb(255, 102, 51). Both three-digit and six-digit codes, with or without the leading hash, are accepted here.

What is the difference between HEX and RGB?

They describe identical colour information in different notations. HEX writes the red, green and blue channels as three pairs of base-16 digits, while RGB writes the same channels as three decimal numbers from 0 to 255. A hex code to RGB conversion is exact and reversible; no colour data is lost, and no colour profile is involved.

Can I get HEX to RGB and CMYK together?

Yes. This page shows the RGB triplet, the CMYK ink percentages, HSL and total ink coverage in one panel. Use RGB for screens and CSS, and treat CMYK as a print approximation that depends on the printer profile and paper stock. The two readings stay in sync, so you can compare screen and print values for the same colour.

Is this hex color to RGB converter free and private?

Yes. The converter is free, needs no account and runs entirely in your browser. Nothing you type, pick or paste is uploaded to a server. The only data kept is your short list of recent colours in local browser storage, which you can clear at any time.