How hex to rgb converter works
Colors on the web are usually written as a hex code, which packs the red, green, and blue channel values into six hexadecimal digits (two per channel). Each pair ranges from 00 to FF, which is 0 to 255 in decimal. The shorthand #rgb expands each digit into a pair (e.g. #4f8 → #44ff88).
This converter parses the hex into its three decimal channel values, formats them as rgb(), and also computes the HSL (hue, saturation, lightness) representation. HSL is often easier for designers because hue, saturation, and lightness map to how people think about color. The conversion follows the standard algorithm based on the maximum and minimum channel.
Type a hex code with or without the leading #. The converter accepts 3- and 6-digit forms and shows a live swatch so you can confirm the color. Use the result to copy rgb() or hsl() values directly into CSS, or to match a color between design tools that use different formats.