Skip to content
Kolorvia

HEX to RGB Converter

Currently showing #3b82f6rgb(59, 130, 246)hsl(217.2, 91.2%, 59.8%). Edit any field below to convert a different color instantly. 9 formats incl. OKLCH & LAB Live WCAG contrast Copy-ready code Free, no sign-up

Color Canvas

In context

Text on white
Text on black
Border

Harmonies from this color

Use it in code

Color Preview

 — sample text

Color Values

HEX
#
RGB
HSL
CMYK
HSV / HSB
LAB
LCH
OKLCH
HWB

Accessibility

Aa White text
Aa Black text
Full contrast check →

About this color

Closest CSS name
Family
Temperature
Relative luminance
Web safe

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

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.

We use cookies for site preferences and, where enabled, Google Analytics and Google AdSense — which may use cookies to personalize ads based on your visits here and elsewhere. See our Privacy Policy for details. Your color tool inputs are never sent to us regardless of your choice.