HEX to RGB converter.

Enter a HEX color code to convert it to RGB format, or vice versa. Simple, fast, and free.

#FF6B9D
RGB color

What is a HEX color?

A HEX color packs the three RGB channels into one six-character code: two hexadecimal digits each for red, green, and blue, prefixed with #. Hexadecimal is base 16, so each pair runs from 00 (0) to FF (255). The two notations describe the exact same color; HEX is just the compact spelling.

How to convert HEX to RGB by hand

Take #FF6B9D. Split it into pairs: FF, 6B, 9D. Convert each pair from base 16: FF = 255, 6B = 107, 9D = 157. Result: rgb(255, 107, 157). Going the other way, divide each channel by 16: the quotient is the first hex digit, the remainder is the second.

Common HEX to RGB conversions

ColorHEXRGB
White#FFFFFFrgb(255, 255, 255)
Black#000000rgb(0, 0, 0)
Red#FF0000rgb(255, 0, 0)
Lime#00FF00rgb(0, 255, 0)
Blue#0000FFrgb(0, 0, 255)
Yellow#FFFF00rgb(255, 255, 0)
Cyan#00FFFFrgb(0, 255, 255)
Magenta#FF00FFrgb(255, 0, 255)
Orange#FFA500rgb(255, 165, 0)
Purple#800080rgb(128, 0, 128)
Gray#808080rgb(128, 128, 128)
Navy#000080rgb(0, 0, 128)

HEX and RGB questions

What is 3-digit shorthand like #F09?

Each digit doubles: #F09 expands to #FF0099. It only works when both digits of every channel match, so it covers a small subset of colors.

How do I add transparency?

Use 8-digit hex (#RRGGBBAA) where the last pair is alpha, or modern CSS syntax like rgb(255 107 157 / 0.5). Both are supported in every current browser.

Which format should I use in CSS?

They render identically, so pick the one your team reads fastest. RGB wins when you need to tweak alpha or do channel math; HEX stays the most compact for design handoffs.

What does the modern rgb() syntax look like?

Space-separated with an optional slash for alpha: rgb(255 107 157) or rgb(255 107 157 / 50%). The comma form still works everywhere too.

Why use this tool?

  • Instant conversion: see results immediately as you type.
  • Bi-directional: convert HEX to RGB and RGB to HEX in one place.
  • Copy ready: one-click copy for your workflow.

Updated June 2026