Saltar al contenido

Conversor HEX a RGB (código de color)

Convierte cualquier código HEX a RGB al instante y gratis. p. ej. #3B82F6 → rgb(59, 130, 246). Vista previa en vivo y CSS listo para pegar.

1.00
CSS rgb()

rgb(10 124 255)

HEX

#0a7cff

CSS hsl()

hsl(212 100% 52%)

HSV

hsv(212 96% 100%)

CMYK

cmyk(96% 51% 0% 0%)

CSS oklch()

oklch(0.608 0.215 257.4)

#0A7CFF

Mejor contraste con

texto negroratio 5.34:1 (WCAG AA requiere 4,5:1)

Pega un color HEX como #0a7cff y devolvemos rgb(), los canales R/G/B y una muestra en vivo. Conversión base-16 a base-10 directa - mismo resultado que en cualquier sitio.

Cómo usarla

  1. Elige el formato de entrada

    HEX, RGB, HSL, HSV/HSB, CMYK, OKLCH o nombre CSS en el selector de formato.

  2. Escribe o pega tu color

    Introduce el valor - o usa el selector de color y el control alfa - y los demás formatos se actualizan en vivo.

  3. Copia el formato que necesites

    Botón de copia junto al formato que pide tu destino.

¿Qué es?

A HEX code is the base-16 way of writing an RGB color: #RRGGBB, where each pair (00 to FF) is a red, green or blue channel from 0 to 255. Converting HEX to RGB is simply decoding each pair from hexadecimal to decimal.

Cuándo usarla

Pulling a color out of a mockup or stylesheet into rgb() so you can add transparency with rgba(), or feeding RGB channel values into code or an API that doesn't accept HEX.

Errores comunes

Forgetting the leading #, mixing up the 3-digit shorthand with the full 6-digit form, and assuming a HEX code carries transparency - that's the 8-digit form (#RRGGBBAA), which adds an alpha channel.

Preguntas frecuentes

How do I convert #FFFFFF to RGB?
#FFFFFF is rgb(255, 255, 255) - pure white. Each pair of hex digits is one channel, and FF is the maximum (255). By the same logic #000000 is rgb(0, 0, 0), black.
What is #3B82F6 in RGB?
rgb(59, 130, 246). The pairs decode as 3B = 59, 82 = 130, F6 = 246. Paste any code above to see it instantly.
Can I use a 3-digit HEX code?
Yes. A shorthand like #0af expands by doubling each digit: #0af = #00aaff = rgb(0, 170, 255).

Valora esta herramienta

Comparte tu experiencia para ayudar a los demás.

Conversor de colores (HEX, RGB, HSL)

Convierte colores entre HEX, RGB, HSL, HSV, CMYK y OKLCH.

Probar

Más en esta categoría