Given a background color, what is the best way to determine if I should use black or white for the foreground color? For example, could I use a formula based on the HSB values of the color? It's for ...
Is there a single text color that, when used on either dark or light background, produces a readable (or at least tolerable) output? If it makes it easier, constraints can be put on the hue, ...