How to convert HEX to RGB (and back)

A HEX code is RGB in disguise: three base-16 pairs, one per channel. #FF6600 means red 255, green 102, blue 0. Here's the conversion — instant with the tool, simple by hand.

Open HEX / RGB / HSL Converter

How the conversion works

Split the six digits into pairs — #FF6600 → FF, 66, 00 — and convert each pair from hexadecimal to decimal: FF=255, 66=102, 00=0. Result: rgb(255, 102, 0). Three-digit shorthand doubles each digit first: #F60 → #FF6600.

An 8-digit HEX adds an alpha pair at the end: #FF660080 is the same orange at 50% opacity — rgba(255, 102, 0, 0.5).

Steps with the tool

  • Paste any HEX, RGB or HSL value into the converter.
  • All other formats update instantly — copy whichever you need.
  • Use HSL when you want to tweak lightness or saturation without changing the hue.

Tools used in this guide

Related guides

How to convert HEX to RGB (and back) — FAQ

Split into pairs and convert each from base 16: #1E90FF → 1E=30, 90=144, FF=255 → rgb(30, 144, 255).