Color Converter
Convert between HEX, RGB, and HSL color formats. Any input updates all others.
How It Works
The Color Converter supports three common color formats used in web development and design: HEX (hexadecimal), RGB (Red, Green, Blue), and HSL (Hue, Saturation, Lightness). Changing any input immediately updates all other formats and the preview swatch.
HEX colors use a six-character hexadecimal notation (e.g., #3b82f6) where pairs of characters represent red, green, and blue channel intensities from 00 to FF. RGB specifies each channel as a decimal value from 0 to 255. HSL provides a more intuitive representation using hue (0-360 degrees on the color wheel), saturation (0-100%), and lightness (0-100%).
The conversion math between these formats is handled with standard algorithms. RGB to HSL conversion identifies the min and max channel values to calculate hue, saturation, and lightness. All processing runs in your browser.