Split the color into three pairs
A standard web color uses the #RRGGBB format. That means the first pair is red, the middle pair is green, and the last pair is blue.
Paste any hex color code and get the RGB values instantly, then keep going with worked examples, visual channel diagrams, a reference palette, reverse conversion, and ready-to-copy CSS snippets.
Tool
Supports 3-digit and 6-digit web colors like `#F3A` or `#FF6B35`.
Converter ready. Enter a hex code or RGB values.
RGB Output
rgb(255, 107, 53)
CSS Snippet
color: #FF6B35; background: rgb(255, 107, 53);
Quick read
The visual swatch updates live so every section on this page stays tied to a real color, not just abstract numbers.
Every hex color is really three tiny numbers packed into one compact code. Read left to right: red pair, green pair, blue pair.
Channel Range
Each pair can represent 256 values, from 0 through 255. That is why hex maps perfectly to RGB channel numbers.
The converter is instant, but the logic is simple enough to understand at a glance. Each pair follows the same base-16 rule.
A standard web color uses the #RRGGBB format. That means the first pair is red, the middle pair is green, and the last pair is blue.
Read each pair as hexadecimal. A through F represent 10 through 15, so FF is 255, 6B is 107, and 35 is 53.
Place the decimal results into rgb(R, G, B). Once each pair is converted, you have the exact browser-ready color value.
Channel Formula
value = (first digit × 16) + second digit
Flow Diagram
These examples keep the conversion grounded in real colors you would actually use in interfaces, dashboards, and design systems.
Example
Red
FF
(15 × 16) + 15
255Green
6B
(6 × 16) + 11
107Blue
35
(3 × 16) + 5
53Example
Red
1A
(1 × 16) + 10
26Green
73
(7 × 16) + 3
115Blue
E8
(14 × 16) + 8
232Reverse Conversion
Start with values between 0 and 255. Convert each one to a two-digit hexadecimal value, then join the red, green, and blue pairs together.
Developer Snippets
JavaScript
const hex = "#FF6B35".replace("#", "");
const [r, g, b] = [0, 2, 4].map((i) =>
parseInt(hex.slice(i, i + 2), 16)
); Python
hex_code = "#FF6B35".lstrip("#")
rgb = tuple(int(hex_code[i:i+2], 16) for i in (0, 2, 4)) A visual reference table is often faster than mental conversion when you are checking brand colors, utility classes, or basic UI tokens.
Split the hex code into red, green, and blue pairs. Convert each pair from base 16 to decimal, then format the result as rgb(R, G, B). For example, #FF6B35 becomes rgb(255, 107, 53).
Yes. Expand each digit so #F3A becomes #FF33AA before converting. Each doubled pair then maps to one RGB channel.
RR is the red channel, GG is the green channel, and BB is the blue channel. Each pair runs from 00 to FF, which maps to 0 through 255 in decimal.
Hex is compact and easy to copy from design tools. RGB is easier when code or graphics APIs need separate channel values, especially for calculations and opacity.
Yes. Enter red, green, and blue values from 0 to 255 and the tool will generate the matching hex code instantly.
Use rgba() for alpha transparency. Convert the base color to RGB first, then add a fourth value between 0 and 1, such as rgba(255, 107, 53, 0.5).
For each 2-character channel pair, convert with channel = firstDigit * 16 + secondDigit. Repeat for red, green, and blue.
No. #ff6b35 and #FF6B35 represent the same color. Most tools normalize the final result to uppercase for readability.
This page focuses on 3-digit and 6-digit web hex colors. 8-digit hex adds an alpha channel at the end, such as #RRGGBBAA.
It is common in CSS, HTML, design systems, component libraries, branding guides, Figma handoff files, and small utility scripts.
Yes. The converter generates both the hex value and ready-to-paste CSS lines so you can move straight into styling work.
Yes. It runs in the browser with no signup, no file upload, and no limit on the number of color conversions.