How to convert hex to RGB: the web developer's color format explained
Hex color codes like #3B82F6 are just RGB values written in hexadecimal. The first two characters are red (3B = 59), the middle two are green (82 = 130), and the last two are blue (F6 = 246). Hex is the dominant color format on the web because it's compact, universally supported, and easy to copy-paste between design tools and code.
Calculator
How this is calculated
Hex colors originated in HTML 3.2 and haven't changed since. The format is case-insensitive (#3b82f6 = #3B82F6) and supports shorthand when each channel uses identical hex digits (#FFF = #FFFFFF). The main limitation of hex is that it doesn't support an alpha channel. For transparency, you need the 8-digit hex format (#3B82F6CC) which adds RGBA support, or you switch to the rgba() functional notation in CSS.
Verdict
Hex is the right format for opaque colors in web development. It's shorter than rgb(), universally recognized, and copy-pastes cleanly between Figma, VS Code, and browser DevTools. Use the 8-digit variant or rgba() when you need transparency.
