Color converter
Convert HEX, RGB and HSL colors and preview the resulting opaque sRGB color.
Opaque sRGB only: #RGB, #RRGGBB, rgb(0, 128, 255) or hsl(210, 100%, 50%). No alpha, named colors or percentages in RGB.
Runs in your browser. Inputs are not uploaded or saved.
How to use
Choose a mode, enter values or load the example, then copy or download your result.
Rules and worked example
Enter #336699 to obtain rgb(51, 102, 153) and hsl(210, 50%, 40%). Short HEX expands each digit: #abc becomes #AABBCC. Hue wraps around the color wheel; saturation and lightness must lie between 0% and 100%.
Questions and answers
Are every conversion and displayed value exact?
HEX and RGB use 8-bit channels. HSL input is converted to the nearest 8-bit RGB color; displayed HSL is rounded to two decimals. Repeated conversion through rounded HSL may therefore change a channel slightly. Transparent colors and other color spaces are outside this tool’s scope.