HEX to RGB Converter: Decode Any Color Code
Convert HEX color codes to RGB values instantly.
Last updated
Contrast on white & black
WCAG 2.1 contrast ratio of #2563EB against a white and a black surface.
AA needs 4.5:1 for normal text and 3:1 for large text (18pt, or 14pt bold); AAA needs 7:1. Use this to choose white or black text over the color.
About this conversion
HEX color codes are the standard way to specify color on the web. A six-digit hexadecimal string like #FF5733 encodes red, green, and blue channels in pairs of two hex digits (00–FF). Shorthand three-digit codes like #F53 expand to #FF5533 by doubling each digit.
RGB notation, on the other hand, expresses the same information as three decimal integers from 0 to 255. Many design tools, animation libraries, and CSS functions like rgb() require decimal values rather than a hex string, making HEX-to-RGB conversion an everyday task for front-end developers and designers.
This tool accepts both three-digit and six-digit hex codes, with or without the leading hash. It validates the input in real time and shows you the exact R, G, and B values along with a live color preview, so you can paste a code from any source and immediately get usable numbers. If you have a color in an image rather than a hex code, the Color Picker from Image can extract the HEX value for you first.
Worked examples
Real conversions this tool produces — enter the inputs to reproduce each result.
Decoding a brand hex to RGB channels
Input
- HEX
- #2563EB
Result
- Red (R)
- 37
- Green (G)
- 99
- Blue (B)
- 235
Each hex pair maps back to 0–255: 25 → 37, 63 → 99, EB → 235. Useful when a design tool wants RGB but the brand guide only lists a hex.
Unpacking a CSS orange
Input
- HEX
- #FF6600
Result
- Red (R)
- 255
- Green (G)
- 102
- Blue (B)
- 0
FF is 255 (full) and 00 is 0 (off) — so this orange is pure red plus a touch under half green, with no blue.
Related content
Was this page helpful?
Color conversions are mathematical approximations. For critical color work, verify against physical swatch books and printed proofs. See our methodology and full disclaimer.
Frequently Asked Questions
What does HEX stand for in color codes?
HEX stands for hexadecimal, a base-16 number system that uses digits 0–9 and letters A–F. In color codes, each pair of hex digits represents the intensity of one color channel (red, green, or blue) on a scale from 00 (0) to FF (255).
Does this tool accept 3-digit HEX codes?
Yes. A 3-digit code like #F36 is automatically expanded to #FF3366 by doubling each digit. The tool accepts codes with or without the leading # symbol.
Why would I need RGB values instead of HEX?
Many design tools, animation libraries, and CSS functions like rgb() require decimal RGB values. Some APIs and programming languages also work with separate R, G, B integers rather than a single hex string.
Cite or embed this tool
Cite this tool
PrinterTools. (2026). HEX to RGB Converter: Decode Any Color Code [online tool]. https://printertools.net/tools/hex-to-rgbEmbed this tool
Paste this on your site to link readers to the free tool. It renders as:
<a href="https://printertools.net/tools/hex-to-rgb" target="_blank" rel="noopener" style="display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid #e2e8f0;border-radius:8px;background:#ffffff;font-family:system-ui,-apple-system,sans-serif;font-size:14px;line-height:1.3;color:#2563eb;text-decoration:none;">HEX to RGB Converter: Decode Any Color Code — free tool by PrinterTools</a>More Print calculators
Browse all print calculators — Color converters for RGB, HEX, CMYK, HSL, HSV, Pantone, RAL, and NCS — plus DPI, paper size, contrast, and ink estimators.