Convert between HEX, RGB, and HSL color formats
#3B82F6rgb(59, 130, 246)rgba(59, 130, 246, 1)hsl(217, 91%, 60%)HEX, RGB, and HSL are three common ways to represent colors in web development. HEX uses a 6-digit hexadecimal notation (#RRGGBB) where each pair represents red, green, and blue intensity from 00 to FF. RGB specifies color as three decimal values from 0-255: rgb(255, 128, 0) is orange. HSL uses Hue (0-360°, the color wheel position), Saturation (0-100%, color intensity), and Lightness (0-100%, brightness). To convert HEX to RGB, parse each pair as a base-16 number. To convert RGB to HSL, normalize R,G,B to 0-1, find max and min values to compute lightness, then calculate saturation and hue from the channel differences. HSL is often preferred for design because adjusting lightness or saturation is intuitive — you can create consistent color palettes by keeping hue constant while varying saturation and lightness.
Built with care by Alpiaal