Passer au contenu principal

Convertisseur Hex vers RGB

Web colors are expressed in hex (#FF5733) for CSS shorthand and RGB (255, 87, 51) for JavaScript and design tools. Our converter translates between hex, RGB, HSL, HSB/HSV, CMYK, and CSS named colors — with a visual color swatch, accessibility contrast checker, and the ability to adjust the color interactively.

Sélecteur de couleur

Cliquez sur l'échantillon pour ouvrir le sélecteur de couleur

#

R

G

B

Couleurs populaires

HEX
RGB
RGBA
HSL

Entrez une couleur valide ci-dessus

Référence des formats de couleur

#B8FF3C — 6-digit hex color (most common in CSS/HTML)
rgb(184, 255, 60) — Red, Green, Blue (0–255 each)
rgba(184, 255, 60, 0.8) — RGB + Alpha transparency (0–1)
hsl(84, 100%, 62%) — Hue (0–360°), Saturation, Lightness
Partager cet outil
Design

À propos de Hex to RGB Color Converter

Web colors are expressed in hex (#FF5733) for CSS shorthand and RGB (255, 87, 51) for JavaScript and design tools. Our converter translates between hex, RGB, HSL, HSB/HSV, CMYK, and CSS named colors — with a visual color swatch, accessibility contrast checker, and the ability to adjust the color interactively.

Comment l'utiliser

  1. Enter a hex code (#FF5733 or FF5733) to see RGB, HSL, and HSB equivalents.
  2. Enter RGB values (0–255 each) to generate the hex code and all other formats.
  3. Use the color picker to select a color visually.
  4. Check contrast ratio against white or black text for WCAG accessibility compliance.

Formule et méthodologie

Hex to RGB: split 6-digit hex into pairs; convert each pair from hex to decimal. #FF5733 → R:255 G:87 B:51. RGB to Hex: convert each channel to 2-digit hex and concatenate. RGB to HSL: normalize to 0–1; compute max/min; H = hue angle; S = (max−min)/(1−|2L−1|); L = (max+min)/2. HSL to RGB: reverse transformation.

Cas d'usage courants

  • Web development: CSS requires hex or rgb(); design tools output HSL
  • Brand colors: converting Pantone/CMYK brand colors to web-safe hex
  • Accessibility: checking if text color meets WCAG AA (4.5:1 contrast) or AAA (7:1)
  • Design systems: documenting color tokens in multiple formats
  • Image processing: working with pixel color values in different color spaces

Questions fréquentes

HSL (Hue, Saturation, Lightness): Lightness 50% = pure color, 0% = black, 100% = white. Used in CSS. HSB/HSV (Hue, Saturation, Brightness/Value): Brightness 100% with Saturation 100% = pure color; Brightness 0% = black regardless of saturation. Used in Photoshop and most design tools. The same bright red: HSL(0°, 100%, 50%) = HSB(0°, 100%, 100%). They describe color differently — HSL is more intuitive for web; HSB for design tools.
WCAG 2.1 Level AA (minimum standard): 4.5:1 for normal text, 3:1 for large text (18pt+ or 14pt bold). Level AAA (enhanced): 7:1 for normal text, 4.5:1 for large text. Black on white = 21:1 (maximum). White on mid-gray (#808080) = 3.95:1 (fails AA for normal text). Use a contrast checker before finalizing text and background color combinations — poor contrast affects 300 million people with visual impairments.

Outils connexes

Outils connexes

Tous les outils →

Intégrer cet outil sur votre site

Gratuit pour usage personnel et commercial. Copiez simplement le code ci-dessous.