Convertir RGB colors to HEX (and back)
Translate color valores entre rgb() y #rrggbb notation, con alpha-channel handling para CSS funcionar.
- 1 Convertidor de color →
Paste rgb(90, 200, 250) to get #5AC8FA, or paste a hex value to get its rgb() form. 8-digit hex with alpha (#5AC8FAFF) converts to rgba() notation.
- 2
Details worth knowing: HEX and rgb() are the same color space (sRGB) in different syntax — conversion is lossless; 3-digit hex (#F0A) is shorthand for #FF00AA; CSS colors work — named colors and hsl() inputs are converted too. When precision matters (design tokens), prefer 6-digit hex or rgb() over 3-digit shorthand.
- 3 Verificador de contraste de color →
After converting, check the color against your background: WCAG contrast ratios determine whether text passes accessibility thresholds (4.5:1 for body text, 3:1 for large text).
Preguntas frecuentes
- Is HEX more accurate than RGB?
- No — they express identical sRGB values. #5AC8FA and rgb(90, 200, 250) are the same color; pick whichever your tooling expects.
- How is alpha handled?
- 8-digit HEX encodes alpha as the last byte (#RRGGBBAA), and rgba() takes alpha as 0–1. An alpha of FF / 1.0 is fully opaque.
Flujos que resuelven esta tarea
Herramientas relacionadas
Convertidor de color
Convert colors between HEX, RGB, HSL, HSV, and CMYK color spaces. Auto-detects input format. Gratis, privado y 100% del lado del cliente. HERRAMIENTA
Verificador de contraste de color
Check WCAG color contrast ratio between foreground and background colors and verify AA/AAA compliance. Gratis, privado y 100% del lado del cliente. HERRAMIENTA
Mezclador de colores
Blend two colors by ratio using normal, multiply, screen, overlay, darken, or lighten blend modes. Gratis, privado y 100% del lado del cliente. HERRAMIENTA