跳到主內容

色彩對比檢查器

開發者工具

透過相對亮度計算WCAG AA/AAA對比值

答案速覽

Color Contrast Checker: WCAG AA/AAA ratios via relative luminance. Color Contrast Checker uses standard developer formulas to compute accurate results instantly.

正文範例Sample text
大字標題 Large heading
對比度比率
7.00:1
AAA
AA 正文 4.5:1
通過
AA 大字 3:1
通過
AAA 正文 7:1
通過
AAA 大字 4.5:1
通過

對比度定位

Fail
僅 AA 大字
AA
AAA

7.00:1 — AAA

WCAG 2.1 閾值對照

級別正文大字當前判定
AA≥ 4.5:1≥ 3:1通過
AAA≥ 7:1≥ 4.5:1通過

大字 = ≥18pt(24px)或 ≥14pt(18.7px)粗體。非文字 UI(焦點框、控制項邊界)需 3:1。

計算步驟

  1. 1Relative luminance: fg = 0.0999, bg = 1.0000 (sRGB → linear → 0.2126R+0.7152G+0.0722B)
  2. 2對比度 = (亮者 + 0.05) / (暗者 + 0.05) = 7.00:1
  3. 3WCAG 2.1:AA 級要求正常字 4.5:1、大字(≥18pt 或 14pt 粗體)3:1;AAA 級要求 7:1 / 4.5:1。
約 8% 男性有紅綠色覺異常——永遠不要只用顏色傳達資訊,配合圖標/文字。對比度要求同樣適用於 UI 元件邊界(WCAG 1.4.11:焦點指示與控制項邊緣需 3:1)。

這個工具對你有幫助嗎?

怎麼用

  1. Paste or type content: drop code/text into the Color Contrast Checker or fill the parameters.
  2. Choose mode/options: switch format, rules or processing as needed.
  3. Live output: results appear instantly — nothing is submitted, data stays in your browser.
  4. One-click copy: copy the output straight into your development environment.

核心要點

  • Color Contrast Checker is a free online developer tool — open and use, no sign-up.
  • All calculations run locally in your browser; your data never leaves the device.
  • Key capability: WCAG AA/AAA ratios via relative luminance.
  • Results come with formulas and reference tables so you can verify every number.

原理與公式

Color Contrast Checker formula

Color Contrast Checker uses standard developer formulas to compute accurate results instantly.

常見問題

How do I use the Color Contrast Checker?
Open the page and fill in the input fields — results update automatically. WCAG AA/AAA ratios via relative luminance.
Are the results accurate?
Yes. Standard formulas and conversion factors are used and verified.
Is it free? Do I need to sign up?
Completely free. No registration, login or download required.
Does it work on mobile?
Yes. The responsive design works on phones, tablets and desktops.
Is my data saved?
No. Everything runs locally in your browser.

相關工具

相關指南

來源與更新

Based on RFC 4648, ECMA-262 and related specifications. Last updated: 2025-07

最近更新:

本頁公式與內容經YiJianSuan團隊覆核,僅供學習參考,實際業務請以官方口徑為準。

內容由YiJianSuan編輯團隊維護並定期覆核,更新與審核流程詳見編輯規範.

引用本頁: YiJianSuan. 色彩對比檢查器[EB/OL]. https://www.yijiansuan.com/zh-TW/c/dev/contrast-check

本工具提供的結果僅供參考,不構成任何專業建議,請以官方核算為準。