~/color-picker

Hex to RGB color converter

Convert a hex color (#ff8800) to its RGB equivalent (rgb(255, 136, 0)). The math, the worked example, and a live converter that handles 3-digit, 6-digit, and 8-digit (with alpha) variants.

# conversion

formatforegroundbackground
hex #ff8800 #ffffff
rgb rgb(255, 136, 0) rgb(255, 255, 255)
hsl hsl(32, 100%, 50%) hsl(0, 0%, 100%)
oklch oklch(75% 0.18 60) oklch(100% 0 0)

# context

Hex is the compact, designer-friendly form. RGB is the explicit numeric form CSS, Canvas, and most APIs accept. The conversion is base-16 → base-10 per channel: split the hex into red/green/blue pairs, parse each as a base-16 number, and you have the 0-255 RGB values.

→ Open in color picker (pre-filled)

# notes

# other conversions