开发者

Display of colorblind images

Quick question: At开发者_如何学C this website here http://www.vischeck.com/examples/ there are a few pictures of numbers hidden within another color to test for color blindness. Is there any way that these images can be generated algorithmically?


They are based on ready-made dot fields, and you overlay a number on them, and do the coloring on the whole dot each time it is partially filled. If You know the correct colors - that will do ;)


What language are you coding in? It's impossible to give any definitive answer without knowing your problem well.

If you're in .NET, GDI is your best bet for generating such a dot field, but it is not simple to do algorithmically, and it's possible that these were hand-drawn.

One easier possibility you have is to use an evenly-spaced circles field, even if it's not as elegant.

Then, you'd pick two colors that aren't supposed to be (easily) distinguishable by (certain?) color-blind people.

Now, you draw a number in the square field (using one of 10 matrices for the numbers 0-9 that represent each number character with sizes compatible with the circle field) using (limited) random variations of the two colors that the person shouldn't distinguish.

In other words, if the person isn't supposed to distinguish red and green, you'd make a character using shades of red on top of a shades of green background.

You'd possibly need HUE>RGB functions, for .NET you'd have to look for a library (I remember using one from codeproject).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜