Hex to RGB

Paste any six-digit hex code and get RGB, HSL, OKLCH, and LAB — ready to copy into CSS or design tools.

rgb(59, 130, 246)

How hex maps to RGB

A hex color `#RRGGBB` encodes three 8-bit channels. Each pair of hexadecimal digits spans 00 (0 decimal) to FF (255 decimal). Pure red `#FF0000` means red at full intensity, green at zero, blue at zero.

Because hex and RGB describe the same sRGB value, conversion is deterministic: split the six digits into three pairs and parse each pair from base 16 to base 10.

Example: `#3B82F6` → red 59, green 130, blue 246 → `rgb(59, 130, 246)`.

Other formats in the results table

HSL expresses the same color as hue, saturation, and lightness—often easier to adjust manually.

OKLCH is a perceptually uniform space supported in modern CSS (`oklch()`), useful for generating even steps across hues.

HSV and CMYK appear for design-tool compatibility; CMYK values are approximations because screen gamuts differ from print inks.

Use the copy buttons to paste values into stylesheets, Figma variables, or design tokens.