ROKING-A11Y APCA Evaluator

Because of the way color is perceived, light text on a dark background is perceived differently than dark text on a light background. This means how the Luminance Contrast is calculated should account for the polarity.

In the results table, generated by clicking the Calculate button, columns show the minimum contrast for various font sizes at the weights specified, from 100 to 900. If the contrast is greater than or equal to the minimum contrast value for a particular font size, the font weight for that entry will be bold. For example, at 12 pixels, the lowest possible weight for which there can be an accessible weight is 400, and a 12 pixel font with a weight of 900 must have an APCA contrast of at least 80 percent.

Background and foreground colors may be specified using a hexadecimal string, e.g., #f00 or #ff0000, an rgb string, e.g., rgb(255, 255, 255), or an hsl string, e.g., hsl(204, 100%, 60%). An opacity may be specified as well, e.g., #f007, #ff000080, rgba(0, 0, 0, .5), or hsla(204, 100%, 60%, .5). Opacity given for background values will be ignored; however, opacity given for foreground values will result in a recalculation of the color value for the foreground with the given background.

Background Foreground Result