Ir al contenido principal
Todas las calculadoras

Color Converter

Convert colors between HEX, RGB, and HSL formats

Última verificación: Precisión verificada

Convert colors instantly between HEX, RGB, and HSL formats. See a live preview, copy CSS-ready values, and choose from preset colors. Essential for web developers, designers, and anyone working with digital color.

Enter a color in any format — HEX (#3B82F6), RGB (59, 130, 246), or HSL (217, 91, 60) — and get instant conversions to all three formats with a visual preview.

Calculado en tu navegador — nunca almacenamos tus datos
Enter a hex color like #3B82F6 or 3B82F6
Color Preview
HEX
#3B82F6
RGB
rgb(59, 130, 246)
HSL
hsl(217, 91%, 60%)
CSS Usage
color: #3B82F6;
color: rgb(59, 130, 246);
color: hsl(217, 91%, 60%);

HEX to RGB Color Converter

How to Use This Color Converter

  1. Select your input format — Choose HEX, RGB, or HSL depending on the color value you have.
  2. Enter the color value — Type or paste your color code. For HEX, include or omit the # symbol.
  3. View all conversions — The tool instantly shows the equivalent value in all three formats.
  4. Copy the value you need — Click "Copy" next to any format to copy CSS-ready code to your clipboard.

Understanding Color Formats

HEX (Hexadecimal)

HEX colors use a 6-digit code representing red, green, and blue channels. Each pair of digits ranges from 00 (no color) to FF (full color). Example: #3B82F6 means R=3B (59), G=82 (130), B=F6 (246).

RGB (Red, Green, Blue)

RGB uses three decimal numbers from 0-255. This is the most intuitive format — each number directly controls one color channel. Example: rgb(59, 130, 246).

HSL (Hue, Saturation, Lightness)

HSL is the most human-readable format. Hue (0-360) is the color on the wheel, Saturation (0-100%) is color intensity, and Lightness (0-100%) controls brightness. Example: hsl(217, 91%, 60%).

Color Conversion Formulas

HEX to RGB: Split the 6-digit hex into 3 pairs, convert each pair from base-16 to base-10.

RGB to HSL: Normalize R, G, B to 0-1 range. Find max and min values. Lightness = (max+min)/2. Saturation and Hue are derived from the channel differences.

HSL to RGB: Calculate chroma (C), then derive R, G, B using the hue sector (which 60-degree segment of the color wheel).

Common Web Colors Reference

ColorHEXRGBHSL
Red#FF0000rgb(255, 0, 0)hsl(0, 100%, 50%)
Green#00FF00rgb(0, 255, 0)hsl(120, 100%, 50%)
Blue#0000FFrgb(0, 0, 255)hsl(240, 100%, 50%)
White#FFFFFFrgb(255, 255, 255)hsl(0, 0%, 100%)
Black#000000rgb(0, 0, 0)hsl(0, 0%, 0%)
Tailwind Blue#3B82F6rgb(59, 130, 246)hsl(217, 91%, 60%)

Sources

  • W3C CSS Color Level 4 specification
  • Conversion formulas: CSS Color Module Level 4 (w3.org/TR/css-color-4)

Related Calculators

Preguntas frecuentes

HEX uses a 6-digit hexadecimal code (#RRGGBB) — compact and widely used in HTML/CSS. RGB specifies red, green, and blue channels as numbers from 0-255 — intuitive for mixing light. HSL uses Hue (0-360 degrees on the color wheel), Saturation (0-100%), and Lightness (0-100%) — the most human-readable format for adjusting colors.

Mantente actualizado

Recibe nuevas calculadoras y consejos en tu correo.