HEX ↔ RGB Color Converter

Convert between HEX color codes and RGB values. Also shows HSL output and a live color preview.

#3B82F6
HEX

#3B82F6

RGB

rgb(59, 130, 246)

HSL

hsl(217, 91%, 60%)

Color Format Reference

HEX (#RRGGBB)

Hexadecimal color codes represent each color channel (Red, Green, Blue) as a two-digit hex number (00–FF). A short 3-digit form (#RGB) is equivalent to #RRGGBB where each digit is doubled.

RGB (Red, Green, Blue)

Each channel is an integer from 0–255. rgb(0, 0, 0) is black, rgb(255, 255, 255) is white. Used in CSS, image processing, and most design tools.

HSL (Hue, Saturation, Lightness)

HSL represents colors by hue (0–360°, the color wheel), saturation (0–100%, how vivid), and lightness (0–100%, where 0% is black and 100% is white). More intuitive for adjusting colors.