About HEX to RGB Converter
Colors on the web are usually written as HEX, like #4f46e5, while design tools and code often want RGB, like rgb(79, 70, 229). They describe the same color two ways: HEX packs the red, green and blue channels into six hex digits, while RGB lists the three channels as numbers from 0 to 255.
This converter translates both ways, shows you the actual color, and adds the HSL values designers use for shades and tints - plus a CSS snippet you can paste straight into a stylesheet.
How to use it
- Type a HEX color and press Convert HEX, or type RGB values and press Convert RGB.
- See the color preview, RGB, HSL and CSS code.
- Copy the value you need.
Frequently asked questions
What is the difference between HEX and RGB?
Nothing about the color itself - HEX is just RGB written in hexadecimal. #ff0000 and rgb(255, 0, 0) are exactly the same red.
Does it accept 3-digit HEX?
Yes. #f60 is expanded to #ff6600 automatically before converting.
What is HSL?
Hue, Saturation and Lightness - a friendlier way to pick shades. Same hue with lower lightness gives a darker version of the color.
Is anything uploaded?
No. Conversion runs entirely in your browser.