←

Color, Contrast and Palette Workbench

applicable boundary Checks WCAG 2.2 text contrast and generates traceable sRGB candidates; does not emulate display, color vision, printing, or full accessibility compliance.

After entering the color, select Analyze Color. All processing is done locally in the browser.waiting for input

Generating candidates and swatches

0%
0 / 00%elapsed time 0.0sEstimated remaining --0/swaiting for input

The progress unit is 514 candidate sampling points plus the selected color level; boundary refinement and color gamut bisection are included in the corresponding sampling tasks. rate represents the number of completions of these high-level tasks per second.

1 Enter the actual color used

Supports strict HEX, RGB(A) and HSL(A); no guessing about naming colors or variables.

Must be opaque, the background will be composited to this color first.

Enter the foreground, background, and final opaque base color; additional opacity is multiplied by the foreground alpha. After analysis, view the unrounded WCAG matrix, accessible candidates, and 5/7/9 level swatches before copying CSS/JSON or downloading. The result is color accessibility information and does not equate to full accessibility compliance.

Repeatable example

Default #111111 text on a white background has a contrast ratio of approximately 18.88:1. 50% transparent black on white has a continuous channel contrast of approximately 3.98:1; the tool calculates this value before quantizing the display.

Methods and principles

Press CSS source-over to compose on gamma-encoded sRGB channels, then press WCAG 2.2 to linearize the final opaque color and calculate relative brightness. The candidate is sampled 257 points on each side of the OKLCH brightness, all PASS/FAIL boundaries are refined 24 times, and finally the actual composite ratio is reviewed. Color palettes are sampled equidistantly from L=0.97 to 0.20 and mapped to sRGB.

Limitations and Scope of Application

This tool does not simulate monitors, ambient light, color vision, HDR, typography, or APCA, nor does it replace an accessibility review of real font sizes, weights, and full pages. The OKLCH candidate uses fixed sampling and 24 downchroma bisections, is a deterministic sRGB approximation, and does not claim mathematical global optimality or full local-MINDE.

Privacy and local processing

Colors, candidates, swatches and export files are only processed in the current browser memory and are not uploaded to the server or saved to localStorage. Refreshing the page will clear the results.

Converting between HEX, RGB and HSL

HEX is the hexadecimal form of the three RGB channels: #FF5733 is rgb(255, 87, 51), with each pair of digits giving a channel from 0 to 255; the last pair of an 8-digit HEX is alpha. HSL describes the same colour by hue (0°–360°), saturation and lightness, so #FF5733 is about hsl(11, 100%, 60%). All three show the same colour on screen.

Frequently asked questions

What contrast ratio does WCAG require?

WCAG 2.2 AA needs at least 4.5:1 for normal text and 3:1 for large text (at least 24px regular or about 18.67px bold). AAA needs 7:1 for normal and 4.5:1 for large text. Non-text elements such as icons and control borders generally need 3:1.

Why does 4.48:1 fail?

The pass/fail check uses the unrounded ratio. #777777 on white is about 4.478:1, below 4.5:1, so it fails AA for normal text even though it looks close.

How is contrast calculated for transparent colours?

The transparent colour is first composited onto the real background the way CSS does, and contrast is measured on the result. For example, 50% black on white displays as grey with a contrast of about 3.98:1.

Where do the accessible colour candidates come from?

The tool keeps the other colour fixed and samples along OKLCH lightness to find colours that reach your target ratio while staying close to the original. Each candidate is re-checked against the actual composited result.

Color, Contrast and Palette Workbench

Enter the foreground, background, and final opaque base color; additional opacity is multiplied by the foreground alpha. After analysis, view the unrounded WCAG matrix, accessible candidates, and 5/7/9 level swatches before copying CSS/JSON or downloading. The result is color accessibility information and does not equate to full accessibility compliance.

settings