ANDI icon indicating copy to clipboard operation
ANDI copied to clipboard

ANDI seems to be miscalculating contrast ratios

Open jcorradino opened this issue 1 year ago • 1 comments

image

In the above image, it is reporting that #4b92bc and #488ec1 are almost passing for large text at 2.96:1, when it in reality is closer to 1.04:1. It is possible to get a correct value by switching back and forth between different elements, but there seems to be no rhyme or reason as to why it is functioning in this way, and the only way to be sure it is accurate is to check another contrast checker.

Version Info: ANDI 29.0.1 / fANDI: 7.0.0

jcorradino avatar Jan 22 '24 00:01 jcorradino

Looking at your screenshot, the hex values are cut off, so I can't completely verify what values you are using. However the two blue swatches do look identical and, I would guess, would give a value close to 1:1 .

If I try the values from your description above in the Contrast Playground, it does calculate the 1:04:1. (Screenshot below)

Screenshot 2024-01-22 101118

So that I can reproduce the issue, can you give me the exact steps that you use to arrive at this potential bug?

JohnCotterSSA avatar Jan 22 '24 15:01 JohnCotterSSA