Lompat ke kandungan utama

Pemeriksa Kontras Warna

Alat Pembangun

Nisbah WCAG AA/AAA melalui kecerahan relatif

Jawapan Pantas

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

Contoh Teks Badan Sample text
Tajuk besar Large heading
Nisbah Kontras
7.00:1
AAA
AA 正文 4.5:1
Lulus
AA 大字 3:1
Lulus
AAA 正文 7:1
Lulus
AAA 大字 4.5:1
Lulus

Penentuan Kedudukan Kontras

Fail
Hanya huruf besar AA
AA
AAA

7.00:1 — AAA

Perbandingan ambang WCAG 2.1

TahapTeks BadanTeks besarPenentuan semasa
AA≥ 4.5:1≥ 3:1Lulus
AAA≥ 7:1≥ 4.5:1Lulus

Teks besar = ≥18pt (24px) atau ≥14pt (18.7px) tebal. UI bukan teks (kotak fokus, sempadan kawalan) perlu 3:1.

Langkah Pengiraan

  1. 1Relative luminance: fg = 0.0999, bg = 1.0000 (sRGB → linear → 0.2126R+0.7152G+0.0722B)
  2. 2Nisbah kontras = (Terang + 0.05) / (Gelap + 0.05) = 7.00:1
  3. 3WCAG 2.1: Tahap AA memerlukan 4.5:1 untuk teks biasa, 3:1 untuk teks besar (≥18pt atau 14pt tebal); Tahap AAA memerlukan 7:1 / 4.5:1.
Lebih Kurang 8% lelaki mempunyai kecacatan warna merah-hijau — jangan hanya guna warna hantar maklumat, sertakan ikon/teks. Keperluan kontras juga berlaku untuk sempadan komponen UI (WCAG 1.4.11: penunjuk fokus & pinggiran kawalan perlu 3:1).

Adakah alat ini membantu anda?

Cara Guna

  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.

Perkara Utama

  • 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.

Prinsip & Formula

Color Contrast Checker formula

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

Soalan Lazim

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.

Alat Berkaitan

Panduan berkaitan

Sumber & Kemas Kini

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

Kemas Kini Terkini:

Formula dan kandungan di halaman ini telah disemak semula oleh pasukan YiJianSuan, hanya untuk rujukan pembelajaran — sila rujuk sumber rasmi untuk urusan sebenar.

Kandungan diselenggara dan disemak semula secara berkala oleh pasukan editorial YiJianSuan — proses kemas kini dan semakan boleh dilihat diDasar Editorial.

Petik Halaman Ini: YiJianSuan. Pemeriksa Kontras Warna[EB/OL]. https://www.yijiansuan.com/ms/c/dev/contrast-check

Keputusan yang diberikan oleh alat ini hanyalah untuk rujukan, tidak membentuk sebarang nasihat profesional — sila rujuk pengiraan rasmi.