What the HEX to RGB Converter does
Type a HEX code such as #2563EB, or choose a color, and see the same color as RGB, HSL and modern CSS syntax with a live swatch. Shorthand (#fff) and 8-digit codes with alpha are supported.
Each result has a copy button so you can paste it straight into your stylesheet.
How to use it
- Enter a HEX code or pick a color.
- Check the swatch.
- Copy the format you need.
Practical examples
- #2563EB = rgb(37, 99, 235).
- #fff = rgb(255, 255, 255).
Features
- 3, 6 and 8-digit HEX
- RGB, HSL and CSS output
- Copy buttons
Limitations
- Colors use the standard sRGB model. Wide-gamut and CMYK conversions are not included.
Privacy
This tool runs entirely in your browser. What you type is not sent to our servers and is discarded when you close or reload the page.
Formula and assumptions
Each pair of hexadecimal digits is converted to a decimal 0–255 channel value. HSL is derived from the RGB values with the standard formulas.
Frequently asked questions
What does the 8-digit HEX mean?
The last two digits are the alpha (opacity) channel.