Hex to RGB Converter

Convert hex ↔ RGB ↔ HSL colors

ConvertersFreeNo Signup
4.2(355 reviews)
All Tools

Loading tool...

About Hex to RGB Converter

A color format converter that translates between hex (#FF5733), RGB (rgb(255,87,51)), and HSL (hsl(11,100%,60%)) color representations. Shows a live color preview, generates complementary and analogous colors, provides CSS-ready output, and calculates luminance and contrast ratio against white/black backgrounds. Supports shorthand hex (#F00), 8-digit hex with alpha, and percentage RGB. Essential for web developers and designers.

Hex to RGB Converter Features

  • Hex/RGB/HSL
  • Live preview
  • Complementary colors
  • CSS output
  • Contrast ratio
Web colors can be expressed in multiple formats: hex (#FF5733), RGB (255, 87, 51), and HSL (11°, 100%, 60%). Each format has advantages — hex is compact, RGB is intuitive for mixing, and HSL is intuitive for adjusting brightness and saturation. This converter handles all three with live preview.

How to Use

Enter a color in any format:

  • Hex: #FF5733 or #F53
  • RGB: 255, 87, 51
  • HSL: 11, 100%, 60%

Color Format Reference

  • Hex: 6 hex digits (2 each for R, G, B), values 00-FF
  • RGB: Three values 0-255
  • HSL: Hue 0-360°, Saturation 0-100%, Lightness 0-100%

Contrast & Accessibility

WCAG requires 4.5:1 contrast ratio for normal text and 3:1 for large text. This tool calculates contrast against black and white to help you choose accessible text colors.

Step-by-Step Instructions

  1. 1Enter a hex code, RGB values, or HSL values.
  2. 2View the live color preview.
  3. 3See all format conversions.
  4. 4Check contrast ratios.
  5. 5Copy any format with one click.

Hex to RGB Converter — Frequently Asked Questions

What's the difference between 3-digit and 6-digit hex?+

3-digit hex is shorthand: #F53 = #FF5533 (each digit is doubled). 6-digit hex gives full 16.7 million color precision.

Why use HSL over RGB?+

HSL is more intuitive for color adjustments. To lighten a color, increase L. To desaturate, decrease S. To shift hue, change H. In RGB, these adjustments require changing all three values.

What's the hex for pure red?+

#FF0000 — maximum red (FF=255), zero green (00), zero blue (00). In RGB: rgb(255,0,0). In HSL: hsl(0,100%,50%).

Share this tool: