Home/HEX ↔ RGB Converter

HEX ↔ RGB Converter

Convert HEX color codes to RGB and RGB to HEX. HSL, CMYK and transparency (alpha) support; convert color lists in one go with batch conversion.

R
G
B
A

Batch conversion

Write one color per line; they're converted to the format you choose.

Frequently Asked Questions

How do you convert a HEX code to RGB?

The HEX code is split into three groups of two characters and each group is converted from base 16 to base 10. For example #6366F1: 63 → 99, 66 → 102, F1 → 241, i.e. rgb(99, 102, 241).

What is an 8-digit HEX (#RRGGBBAA)?

The last two digits show the transparency (alpha): FF is fully opaque, 80 about 50%, 00 fully transparent. When you move the alpha slider, the 8-digit code is generated automatically.

What does a 3-digit HEX code mean?

A short form like #F80 means each digit is repeated twice: #F80 = #FF8800.