HEX ↔ RGB Converter

Convert between HEX, RGB, and HSL color codes with a live preview.

HEX#3B82F6
RGBrgb(59, 130, 246)
HSLhsl(217, 91%, 60%)

Frequently Asked Questions

HEX is a six-digit hexadecimal notation representing a color's red, green, and blue components (e.g., #3B82F6). Each pair of digits ranges from 00 to FF (0–255 in decimal).
RGB stands for Red, Green, Blue — the three additive primary colors of light. Each channel ranges from 0 to 255, and combining all three at full intensity produces white.
Split the six-character HEX code into three pairs and convert each pair from base-16 to base-10. For example, #3B82F6 becomes R:59, G:130, B:246.
CSS supports several color formats including HEX (#ff0000), RGB (rgb(255, 0, 0)), HSL (hsl(0, 100%, 50%)), and named colors (red). All produce the same visual result.
Web-safe colors are a set of 216 colors that display consistently across all browsers and monitors. They use only the hex values 00, 33, 66, 99, CC, and FF for each channel.
HSL stands for Hue, Saturation, and Lightness. Hue is the color angle (0–360°), saturation is the intensity (0–100%), and lightness controls how light or dark the color is (0–100%).