How to find colors very close in the RGB spectrum but perceived very different by humans?

128 Views Asked by At

I'm trying to construct a CAPTCHA based on color similarity keeping the text color c1 close to the background noise color c2 in the RGB color model. But c1 and c2 in reality should be perceived very different by humans, so that users can read text easily but at the same time it is difficult to decode text through programming. Is there any combination of color which is closer in all color models but in reality it is perceived different by humans?

I know I can test the similarity of colors using delta e concept of LAB color model. But, how to identify such colors in RGB color model systematically without hit and trial?

1

There are 1 best solutions below

0
On

It sounds like you're trying to find colors with the smallest MacAdam ellipse.

However, your assumption of difficulty for the CAPTCHA is incorrect. Attacker can easily convert RGB images to LAB (or similar) colorspace for processing, completely defeating the trick. For attacks based on neural networks this won't even be a speed bump, because they'll implicitly learn the required color space.

Also keep in mind that humans may not reliably see colors on screen due to viewing conditions (sunlight, low-end LCD panels) and color blindness.