HEX to RGB Converter
Color Canvas
In context
Harmonies from this color
Use it in code
Color Preview
Color Values
Recent Colors
No recent colors yet — pick one above.
About this tool
Pick a color visually, or type an exact HEX, RGB, or HSL value — every field stays in sync, live, entirely in your browser.
How the conversion works
A HEX color code packs three channels — red, green, and blue — into six hexadecimal digits: two digits per channel, each ranging from 00 to ff. Converting to RGB just means reading each pair as a base-16 number and writing it in base-10 instead. #3b82f6 splits into 3b, 82, and f6, which are 59, 130, and 246 in decimal — giving rgb(59, 130, 246).
Common mistakes
The # belongs in CSS
(color: #3b82f6;)
but not in most JavaScript canvas or design-tool APIs that ask for a bare value — check what your
target expects before pasting. Three-digit shorthand like
#f00 expands by
doubling each digit (#ff0000),
not by padding with zeros. Case never matters:
#FF6347 and
#ff6347 are identical.
And an eight-digit value isn't a different color model — the last two digits are alpha
(transparency), covered in our
HEX guide.
For the deeper story of why RGB channels run 0–255 at all, see
the RGB color model explained.
A note on accessibility
Converting a color between formats doesn't tell you whether it's usable as text or background. Before shipping a color combination, check its contrast against WCAG AA (4.5:1 for normal text, 3:1 for large text).
Frequently asked questions
No. HEX and RGB are two different ways of writing the exact same color value; converting between them never changes the color itself.
Each channel is stored as one byte (8 bits), which can represent 256 distinct values, from 0 to 255. This maps directly onto HEX's two-digit-per-channel format, since two hexadecimal digits also cover exactly 256 possible values (00 to ff).
Use the eight-digit form #RRGGBBAA, where the final pair is the alpha channel — #ff634780 is tomato at roughly 50% opacity. The equivalent in functional notation is rgb(255 99 71 / 0.5). Both are supported in all modern browsers.
This converter shows both live: modern CSS accepts them directly as oklch() and lab() functions, no preprocessing needed. They're worth using when you need perceptually even adjustments — see the OKLCH guide for when they beat HEX and HSL.
Related tools
Color Wheel
Explore complementary, analogous, triadic, split-complementary, tetradic, and square harmonies on an interactive hue wheel.
Try it → ColorsDelta E Calculator
Calculate the perceptual color difference (Delta E) between two colors, with a plain-language interpretation of how noticeable it is.
Try it → ColorsImage Color Picker
Upload an image, click anywhere to sample the exact pixel color, and extract a dominant color palette — entirely in your browser.
Try it →Ready to find your perfect palette?
Start from any color and let real color theory do the rest — or warm up with today's puzzle.