Color converter
HEX / RGB / HSL convert both ways; fill any one and the other two follow, with WCAG contrast checks
支持 #RGB / #RRGGBB / #RRGGBBAA 与 rgb()/rgba()/hsl()/hsla()(alpha 支持 0–255 或 0–1)。在任意一个框里修改回车,另两个自动同步。
WCAG 对比度检查(前景 / 背景)
FAQ
No. Parsing, converting and the contrast computation all run locally in your browser, with no server requests at all.
HEX (#RGB / #RRGGBB / #RRGGBBAA with alpha), rgb() / rgba(), hsl() / hsla() - type in any one of them, the other two sync automatically, and each can be copied with one click.
The luminance ratio of foreground to background colour (WCAG 2.1 terms): 4.5:1 or better passes for normal text (AA), 3:1 or better passes for large text (about 18pt, or 14pt bold), 7:1 reaches AAA. For body text, treat 4.5 as the bottom line.
Yes - the three are different notations of one colour and the conversion is lossless (the HSL hue/saturation/lightness are displayed rounded to whole percent, and the copied value matches the preview). Note the maths is done in the sRGB space: for wide-gamut values such as Display P3 the numbers are only for reference.