HEX to RGB Converter

Convert between HEX and RGB color formats, plus HSL, HSV, CMYK, OKLab, and OKLCH readouts.

Color Format Converter

Conversions are computed client-side. OKLab/OKLCH based on D65; CMYK uses simple device-independent formula.

Color Format Guide

HEX (Hexadecimal)

Common on the web. Uses 6 digits (0-9, A-F) preceded by #. Each pair maps to red, green, and blue (00–FF).

#FF5733

RGB / RGBA

Red, green, blue values (0–255). RGBA adds an alpha channel (0–1) for transparency.

rgb(255, 87, 51)

HSL / HSLA

Hue (0–360°), Saturation (0–100%), Lightness (0–100%). HSLA adds alpha. Intuitive for creating color scales.

hsl(9, 100%, 60%)

HSV

Hue, Saturation, Value. Similar to HSL but uses Value instead of Lightness. Common in image editing tools.

hsv(9, 80%, 100%)

CMYK

Cyan, Magenta, Yellow, Key (black). Used for print workflows. Device-dependent and approximate from RGB.

cmyk(0%, 66%, 80%, 0%)

OKLab / OKLCH

Perceptually uniform color spaces. OKLCH (Lightness, Chroma, Hue) is great for accessible, predictable color ramps.

oklch(62% 0.20 264)

Tips for Web Developers

Accessibility

  • • Aim for 4.5:1 contrast for normal text
  • • Test colorblind accessibility
  • • Don’t use color-only cues
  • • Support dark mode themes

Best Practices

  • • Use CSS custom properties for palettes
  • • Prefer HSL/OKLCH to build ramps
  • • Keep brand colors consistent across platforms
  • • Validate on multiple devices