跳到正文

STEMSTUDIO

Convert colours and check contrast

Colour · runs on this device

Convert colours and check contrast

Convert HEX, RGB and HSL, and check text/background contrast against WCAG.

  • Free, no account
  • Nothing is sent

Help

HSL is shown rounded to whole numbers. Pasting that value back can land up to 3/255 away from the original colour (HEX and RGB are exact). For colours near a threshold, the pass/fail above can change. “Large” means roughly 24px and above, or 19px when bold. Below that, judge against the small-text threshold of 4.5:1.

Processing, communication and stored data

在 HEX、RGB、HSL 之间转换。输入文字颜色和背景色,还能得到对比度以及是否满足 WCAG 标准。

常见问题

颜色会被发送到哪里吗?

不会。转换和对比度都在浏览器中计算。

通过了,读起来却还是不好。

会有这种情况。对比度只看亮度——不看色相差或笔画粗细。所以才有样例;最后一步请相信自己的眼睛。

能处理带透明度的颜色吗?

不能。半透明的颜色取决于后面是什么,所以不存在单一的对比度。请输入合成后的颜色。

要达标,该改哪个颜色?

通常改背景。文字颜色常常由品牌决定,而背景改变明度也不会改变设计的性格。切换到 HSL,以 5 为步长调整 L,对比度达标就停。色相和饱和度保持不变,配色看起来还是原来的样子。

深色模式也用同样的标准吗?

是的——但在浅色背景上可行的组合,在深色背景上不一定可行,所以两边都要检查。对着白色选的高饱和颜色,换成深色背景后最常不达标。

考虑色觉差异吗?

不考虑。这里只测亮度差,不测两种色相有多容易区分。一种组合可能对比度达标,但对分不清红绿的人仍然无法阅读。不只用颜色传达含义——同时使用形状、文字或位置——是和对比度分开的另一项要求。

Ratings from users

Ratings appear once there are 10.

Report a problem or suggest something

The tool name, this page’s path and your browser type are sent with it. Files are never sent. For a reply, use the email on the Contact page.