跳到內文

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.