How To Guide

How to Convert HEX to RGB (and RGB to HEX) Online Free

Convert between HEX (#FF5733), RGB (255, 87, 51), HSL, and CMYK color formats instantly. Paste any color value, get every representation — with alpha channel support.

How HEX and RGB relate

HEX is just RGB in hexadecimal. #FF5733 splits into FF (255 red), 57 (87 green), 33 (51 blue). The conversion is lossless and two-way. HEX is popular because it's compact and CSS-friendly; RGB wins when you need to do math on components or add alpha transparency with rgba().

What the color converter gives you

  • HEX 6-digit#FF5733 — standard web color
  • HEX 8-digit#FF5733FF — adds alpha channel
  • HEX 3-digit shorthand#F53 — CSS shorthand for duplicated nibbles
  • RGBrgb(255, 87, 51) — component form
  • RGBArgba(255, 87, 51, 0.8) — with alpha 0-1
  • HSLhsl(11, 100%, 60%) — hue, saturation, lightness; intuitive for color picking
  • HSVhsv(11, 80%, 100%) — used in design tools
  • CMYK — cyan, magenta, yellow, black for print work

When to reach for HSL

HSL is the format that lets you reason about colors like a human. Same hue, darker? Drop the L. More vivid? Raise the S. Generating a color palette? Step the H by 30-60 degrees. The math is trivial in HSL and awful in HEX/RGB. For theme design systems, storing hues + separate saturation/lightness variables makes later edits dramatically easier.

The alpha channel trap

HEX traditionally doesn't have alpha. Modern CSS supports 8-digit HEX (#RRGGBBAA) but older browsers don't parse it. For compatibility, use rgba() — supported since IE9. Alpha values range 0 (transparent) to 1 (opaque) in CSS; 00-FF in HEX.

Color math: contrast, darkening, analogous colors

WCAG AA requires a contrast ratio of at least 4.5:1 between text and background. Convert both colors to RGB, compute relative luminance, take the ratio — failing that check is the most common accessibility bug on the web. For darkening a brand color for hover states, dropping HSL lightness by 8-12% gives a consistent perceived shift.

Related color tools

Need to pick a color visually rather than convert a known value? Use the color picker. For optimizing SVG icon files (including their color attributes), use SVG optimizer.

Featured Tools

Try these free tools directly in your browser — no sign-up required.

how to convert hex to rgb hex to rgb converter rgb to hex color converter online hsl to rgb

Explore 300+ Free Tools

Utilko has tools for developers, writers, designers, students, and everyday users — all free, all browser-based.