What is HEX to RGB Converter?
HEX to RGB Converter — A HEX to RGB converter turns a hexadecimal CSS color such as #2563eb into red, green, and blue channel values such as rgb(37, 99, 235), while also showing related HSL values.
Loading your tools...
Convert 6-digit hex colors to RGB and HSL, or enter RGB/HSL values to get the matching hex code. Preview the color and copy CSS-ready values instantly.
HEX to RGB Converter: Enter a 6-digit hex color like #2563eb to get rgb(37, 99, 235), hsl(217, 83%, 53%), rgba(), hsla(), and a CSS variable line. You can also enter RGB or HSL values to convert back to hex.
Loading Tool...
HEX to RGB Converter — A HEX to RGB converter turns a hexadecimal CSS color such as #2563eb into red, green, and blue channel values such as rgb(37, 99, 235), while also showing related HSL values.
Choose the Hex, RGB, or HSL tab.
Enter a 6-digit hex code or the numeric RGB/HSL channel values.
Adjust the alpha value if you need rgba() or hsla() output.
Check the live swatch to confirm the color.
Copy the format you need for CSS, JavaScript, or a design token file.
Convert a Figma or design-system hex token into rgb() for CSS-in-JS.
Turn RGB values from browser DevTools into a reusable hex token.
Create rgba() or hsla() values for translucent overlays.
Check HSL hue, saturation, and lightness before building hover colors.
Copy a CSS custom property line for a theme file.
This converter focuses on the formats used most often in everyday frontend work: 6-digit hex, RGB, HSL, RGBA, HSLA, and CSS variables. It intentionally avoids claiming broader color-space support that the current component does not parse, such as OKLCH, LAB, CMYK, HSV, named CSS colors, or palette matching.
Current color with 100% opacity
Hex
#2563eb
RGB
rgb(37, 99, 235)
RGBA
rgba(37, 99, 235, 1)
HSL
hsl(217, 83%, 53%)
HSLA
hsla(217, 83%, 53%, 1)
CSS Variable
--color-primary: #2563eb;