Alex Rivera | Logout

Given a background color, how to get a foreground color that makes it readable on that background color?

Asked 2010-06-25T07:26:04.003
39

Given a background color, how to get a foreground color that makes it readable on that background color?

I mean computing that foreground color automatically in a program.

Or simplify the problem, if the foreground color is chosen from white/black, how to do the choice in a program?

Edit
Report

1 Answer

0

You could compute the inverse colour, but you run the risk of contrast diminishing "in the middle" of the colour space.

answered 2010-06-25T07:36:27.777

Your Answer