APCA Contrast Checker - Online New Accessible Perceptual Contrast
Check the Accessible Perceptual Contrast Algorithm (APCA) ratio. The next‑generation contrast method for WCAG 3.
UD5 Toolkit
Online emulator for testing CSS prefers-contrast media query — simulate high & low contrast modes without changing your OS settings.
This paragraph demonstrates how body text renders under the current contrast mode. Text should remain legible and comfortable to read across all contrast preferences.
Secondary text like captions, footnotes, and helper descriptions — these need special attention in low-contrast modes.
/* Default styles (no preference) */
body {
color: #1e293b;
background: #ffffff;
}
/* High contrast mode */
@media (prefers-contrast: more) {
body {
color: #000;
background: #fff;
border-color: #000;
}
a { color: #0000ee; text-decoration: underline; }
button { border: 2px solid #000; }
}
/* Low contrast mode */
@media (prefers-contrast: less) {
body {
color: #6b7280;
background: #f9fafb;
border-color: #e5e7eb;
}
}
// Detect contrast preference
const moreContrast = window.matchMedia(
'(prefers-contrast: more)'
);
const lessContrast = window.matchMedia(
'(prefers-contrast: less)'
);
if (moreContrast.matches) {
console.log('High contrast preferred');
}
// Listen for changes in real-time
moreContrast.addEventListener('change', (e) => {
if (e.matches) {
applyHighContrastTheme();
}
});
Combine prefers-contrast with prefers-color-scheme for comprehensive accessibility support.
In Windows High Contrast Mode, forced-colors: active also applies. Use both queries for full coverage.
Supported in Chrome 96+, Firefox 101+, Edge 96+, Safari 15+. ~92% global coverage as of 2025.
prefers-contrast is a CSS media query that detects the user's system-level contrast preference. It allows websites to adapt their visual presentation based on whether the user prefers more contrast (high contrast), less contrast (low contrast), or has no preference. This is part of the CSS Media Queries Level 5 specification and is crucial for accessibility — particularly for users with visual impairments who rely on high contrast to perceive content clearly.
no-preference — The user has not expressed any contrast preference. This is the default.more — The user prefers higher contrast. On Windows, this corresponds to High Contrast Mode. On macOS, it aligns with "Increase Contrast" in Accessibility settings.less — The user prefers lower contrast. Some users find high contrast fatiguing and prefer softer visual distinctions.custom — The user has a custom contrast scheme (rare; primarily used with forced-colors on Windows).window.matchMedia() to query the contrast preference. You can check the current value and also listen for real-time changes when the user adjusts their system settings:
const mq = window.matchMedia('(prefers-contrast: more)');
if (mq.matches) { /* apply high contrast */ }
mq.addEventListener('change', (e) => {
if (e.matches) { /* switched to high contrast */ }
});
prefers-contrast: more — Indicates the user wants higher contrast. The website still controls the color palette but should ensure sufficient contrast ratios.forced-colors: active — Indicates a forced color palette is applied by the OS (e.g., Windows High Contrast Mode). The browser overrides many author styles with system colors like CanvasText, Canvas, ButtonFace, etc. Use both queries together for maximum compatibility in accessibility scenarios.
Global browser coverage is approximately 92% as of early 2025. Always provide a sensible default fallback for unsupported browsers.
more mode, increase border widths and use solid outlines for focus indicators.@media (prefers-contrast: more) and (prefers-color-scheme: dark) for fine-grained control.gnome-tweaks for advanced options.@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
/* High contrast + dark mode */
body { color: #fff; background: #000; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: light) {
/* High contrast + light mode */
body { color: #000; background: #fff; }
}
This approach creates 4 distinct themes (light/dark × normal/high-contrast) for comprehensive coverage.
prefers-contrast: more helps meet these criteria when users explicitly request higher contrast. Conversely, prefers-contrast: less serves users who find maximum contrast uncomfortable — a valid accessibility need recognized by WCAG's flexibility principle. Always ensure your less mode still meets at least the AA minimum.
prefers-contrast. Update your browser.forced-colors: active but may not always set prefers-contrast: more depending on the OS version. On Windows 11, both are typically set together.more, less, and custom.chrome://flags or about:config.
less mode, maintain at least 4.5:1 for body text.Check the Accessible Perceptual Contrast Algorithm (APCA) ratio. The next‑generation contrast method for WCAG 3.
Enter a URL and fetch its text/background colors to perform a bulk contrast check. See warnings for WCAG violations.
Compare text‑rendering: auto, optimizeSpeed, optimizeLegibility, geometricPrecision. See kerning and ligature changes live.
Upload an image and see a rough simulation of how it might look when printed. Highlights areas that may lose detail.
Automatically improve the contrast of dark or washed‑out photos using histogram equalization. One‑click auto‑tune. All canvas‑based.
See your monitor's color depth and pixel depth. Detect if HDR or wide gamut is available using media queries.
Simulate a full‑page screenshot by stitching screen captures (limited). Works best on simple pages. Use browser’s native capture.
Compare font‑display values (block, swap, fallback, optional) on the fly. See how text renders during web font load. Choose the right strategy.
Convert any photo into a stark 1‑bit black‑and‑white image (no grays). Adjust threshold. Save as PNG.
Enter a URL and view it in three iframes: mobile, tablet, and desktop side‑by‑side. Quick responsive check.
Analyze letter/symbol frequency with an interactive bar chart and heatmap. Useful for breaking simple ciphers, linguistics, and SEO keyword analysis. Local processing.
Analyze text for screen reader friendliness: detect vague link text, missing alt suggestions. Get a report. Local.
Convert hex, RGB, or HSL into the modern OKLCH color space. See the preview and copy CSS oklch() value. Local.
Toggle content‑visibility: auto on long blocks and see the rendering time difference. Understand this powerful property.
See exact dimensions of your current browser inner/outer window, screen resolution, and pixel ratio. Developer debug.
Change text orientation within vertical writing mode. See mixed, upright, sideways. Useful for CJK layout.
Adjust ISO, f‑stop, shutter speed and see a simulated image brightness and depth of field effect. Learn manual mode.
Paste text and get a rough analysis of its emotional tone (happy, sad, angry, etc.) based on keyword matching. Local.
Enter an HTML snippet and see a rough transcription of what a screen reader might announce. Check alt texts.
Inject dynamic messages into ARIA live regions and monitor how they trigger screen reader announcements. Debug a11y.
Transform any text into the Bionic Reading® format that bolds the first few letters of each word. Improve reading speed.
Enter megapixels and desired DPI to see the maximum print size without upscaling. Quick quality check.
Measure your internet connection speed by downloading and uploading a small test file. Works from your browser.
Paste or write a CSS gradient value and instantly see the rendered output. Debug and iterate on gradients quickly. Local preview.
Display text in horizontal‑tb, vertical‑rl, vertical‑lr. See how block and inline directions switch. For multilingual sites.
Pick any two colors and blend them proportionally with a slider. Get the resulting hex, RGB, and HSL. Pure client‑side.
Layer gradients and images and blend them with background‑blend‑mode. Create hero sections. Copy CSS.
Upload an image containing a QR code and decode its content. Works offline using JavaScript QR decoder. No camera needed.
Demonstrate frequency separation by splitting an image into high/low frequency layers. Visual tool, not full editor.
Mix colors with different alpha channels using color‑mix(). See how transparent colors combine. Copy the CSS.