Kiểm Tra Độ Tương Phản Màu
Kiểm tra tỷ lệ tương phản màu sắc theo chuẩn khả năng tiếp cận WCAG 2.1 cấp độ AA và AAA cho văn bản thông thường, văn bản lớn và các thành phần giao diện.
Tùy chọn
Normal text looks like this.
Văn bản lớn
\
Kết quả
Meets AA for text- Tỷ lệ tương phản
- 17.08:1
| Category | AA | AAA |
|---|---|---|
| Văn bản lớn | Đạt | Đạt |
| Small text | Đạt | Đạt |
| Graphics and UI | Đạt | N/A |
Cách thức hoạt động
Nhập dữ liệu của bạn
Điền các giá trị cần thiết, dán văn bản hoặc tải lên tệp bạn muốn xử lý.
Xem kết quả tức thì
Hầu hết các công cụ cập nhật theo thời gian thực khi bạn nhập liệu; một số công cụ sử dụng một nút hành động duy nhất.
Sử dụng kết quả
Sao chép, tải xuống hoặc chia sẻ kết quả được tạo — bạn luôn có toàn quyền kiểm soát dữ liệu của mình.
Kiểm Tra Độ Tương Phản Màu là gì?
Check the WCAG contrast ratio between a text color and a background color, and see whether it passes AA and AAA at both normal and large text sizes.
How to check color contrast
What the ratio means
The contrast ratio ranges from 1:1 (identical colors) to 21:1 (black on white), calculated from each color's relative luminance using the formula defined in the WCAG 2.x specification.
AA and AAA thresholds
- AA, normal text: at least 4.5:1.
- AA, large text: at least 3:1.
- AAA, normal text: at least 7:1.
- AAA, large text: at least 4.5:1.
- Large text means 18pt (24px) regular weight, or 14pt (about 18.7px) bold, per the WCAG definition.
Reading the preview
The sample box shows both text sizes rendered with your two colors, which is a faster way to judge readability than the ratio number alone.
How to use it
- Pick or type a foreground (text) color and a background color.
- Read the contrast ratio and the four pass/fail results.
- Use the swap button to check the pair in the other direction.
Contrast notes
The ratio uses WCAG 2.x relative luminance math for sRGB colors. Transparency should be tested against the final composited background color.
Các Câu Hỏi Thường Gặp (FAQ)
Which level should I aim for?
AA is the widely required baseline for web accessibility, including under most legal accessibility requirements. AAA is stricter and recommended where you can achieve it, especially for body text.
Does this check anything besides contrast?
No. Color contrast is one part of text accessibility; font size, weight, and spacing also affect readability but are not evaluated here.
Why are there separate thresholds for large text?
WCAG allows a lower ratio for large text because bigger, bolder strokes stay legible at lower contrast than small body text does.
Does alpha or transparency affect the ratio?
The WCAG contrast calculation is based on the final visible colors. If your UI uses transparency, first sample or calculate the composited color over its real background, then test that pair.
Công Cụ Liên Quan
- Khả dụngCục bộ
Tính Tỷ Lệ Khung Hình (Aspect Ratio)
Tính kích thước chiều rộng hoặc chiều cao tương ứng theo tỷ lệ 16:9, 4:3, 1:1...
- Khả dụngCục bộ
Trình Tạo CSS clamp() Kiểu Chữ & Khoảng Cách Linh Hoạt
Tạo các quy tắc CSS clamp() cho cỡ chữ và khoảng cách co giãn mượt mà theo màn hình.
- Khả dụngCục bộ
Chuyển Đổi SVG sang Data URI
Chuyển đổi mã SVG thành chuỗi CSS background Data URI và ngược lại.
- Khả dụngCục bộ
Trích Xuất Bảng Màu từ Hình Ảnh
Tự động trích xuất các màu sắc chủ đạo từ bất kỳ bức ảnh nào.
- Khả dụngCục bộ
Tối Ưu Hóa Tệp SVG
Giảm dung lượng tệp vector SVG bằng cách loại bỏ mã thừa và làm gọn đường vẽ.
- Khả dụngCục bộ
Tính Điểm Ưu Tiên CSS Specificity
Đo lường và so sánh trọng số ưu tiên của các bộ chọn CSS (Inline, ID, Class, Element).
- Khả dụngCục bộ
Tính Thang Tỷ Lệ Kiểu Chữ Typography
Tạo hệ thống cỡ chữ hài hòa theo các tỷ lệ vàng, tỷ lệ Major Third, Perfect Fourth...
- Khả dụngCục bộ
Mô Phỏng Thị Giác Mù Màu
Xem trước hình ảnh qua góc nhìn của các dạng mù màu (Đỏ-Xanh, Lam-Vàng...).
- Khả dụngCục bộ
Tính Mật Độ Điểm Ảnh Màn Hình (PPI)
Tính mật độ điểm ảnh PPI, kích thước điểm ảnh (dot pitch) và tổng số pixel màn hình.
- Khả dụngCục bộ
Tạo Chữ Ký Email Chuyên Nghiệp HTML
Tạo mẫu chữ ký email đẹp mắt kèm logo, chức danh, liên kết mạng xã hội.