🎨 HEX ⇄ RGB Color Converter

Convert colors between HEX and RGB, with a live preview.

Enter your details

Result
HEX
#3B4CCA
RGBrgb(59, 76, 202)
HSLhsl(233, 55%, 51%)

How the hex ⇄ rgb color converter works

HEX represents each of red, green and blue as a two-digit base-16 number (00–FF). RGB represents the same three channels in base-10 (0–255). HSL (Hue, Saturation, Lightness) describes the same color in a more human-intuitive way — the conversion between them is a standard, well-defined formula used across virtually all design and web tools.

Step-by-step guide

  1. Enter a HEX color code, or set individual R, G, B values.
  2. Both fields stay in sync automatically.
  3. Read the equivalent HEX, RGB and HSL values, with a live preview swatch.

Common uses

  • Converting a designer-provided HEX code into RGB for a codebase that requires it
  • Checking or tweaking a brand color across formats
  • Quickly previewing how a color code will actually look

Frequently asked questions

Yes — shorthand codes like #3AC are automatically expanded to their full 6-digit equivalent (#33AACC).
RGB defines a color by its red/green/blue light intensities, which is how screens render color. HSL describes the same color by hue (position on the color wheel), saturation (intensity) and lightness — often more intuitive for adjusting a color by eye.

Related tools