How to use
- Paste a color in any supported format.
- HEX, RGB and HSL all update immediately, with a preview swatch above them.
- Click Copy next to whichever format you need.
HEX, RGB and HSL describe the same colors differently
HEX and RGB are the same thing in different clothes. Both give the intensity of red,
green and blue from 0 to 255; hex writes each as two hexadecimal digits, RGB writes them as
decimal numbers. #2f6df6 and rgb(47, 109, 246) are byte-for-byte identical, which is why
converting between them is exact and reversible.
HSL is a genuinely different model. It describes a color as a position on the color wheel (hue, 0–360°), how vivid it is (saturation, 0–100%), and how light it is (lightness, 0–100%). This matters in practice because it matches how people actually think about color. “The same blue, but lighter” is a one-number change in HSL and an opaque puzzle in hex.
That is also why HSL is the right tool for building a palette. Fix the hue at 220, step the
lightness from 95% down to 20%, and you get a coherent set of tints and shades of one blue.
Trying to produce that by hand-editing #2f6df6 is guesswork.
The trade-off is precision. Because HSL is written with integers, the conversion back to RGB rounds, and you can end up about 1% away from where you started. For display that difference is invisible; if you need an exact value to survive a round trip, keep it in hex.