Hex to RGB Converter
Convert a hex color code to RGB values with a live preview swatch.
Loading tool…
About this tool
CSS accepts hex colors, but canvas APIs, game engines, and many design tools want RGB triplets. Type any hex — full 6-digit or 3-digit shorthand — and get the exact red, green, and blue channels.
A live preview swatch shows the color as you type, so a typo is obvious before you copy the value anywhere.
How to use
- Type or paste a hex color like #ff5733 or #f53.
- Read the rgb(r, g, b) result and the channel breakdown.
- Click Copy to use it in your code.
Frequently asked questions
Yes. Shorthand like #f53 is expanded to #ff5533 before conversion, following the CSS rule of doubling each digit.
No. ff5733 works the same as #ff5733 — the tool strips the hash if it is there.
Some APIs (like canvas fillStyle with alpha math, shaders, or native app code) take separate red, green, and blue numbers rather than a hex string.
Related tools
Color Palette Generator
Enter a base color to generate complementary, analogous, triadic, and more palettes.
Gradient Generator
Build multi-stop linear gradients with angle control and live preview — CSS ready.