Color converter
Convert colors between HEX, RGB and HSL with contrast against white and black.
How it works
HEX (including #RGB shorthand), rgb(r, g, b) with channels 0–255 and hsl(h, s%, l%) are converted through sRGB. Relative luminance follows WCAG 2.x for contrast ratios rounded to two decimals against white and black backgrounds.
Runs in your browser; nothing is uploaded.
FAQ
Does this support alpha?
No. Only opaque colors are read: 3- and 6-digit HEX, rgb() and hsl(). Eight-digit hex and rgba() or hsla() input are rejected.
Are contrast ratios accessibility guarantees?
They are mathematical ratios for the chosen pair. Real UI also depends on font size, weight and surrounding colors.
Which HSL definition is used?
CSS sRGB HSL: hue 0–360, saturation and lightness as percentages matching browser style conventions.
Related developer tools
Bookmark this page for next time, or copy its link. Shared links contain no working input.
Link to this tool: https://www.toolpick.dev/free-tools/color-converter