I have a schedule that I created that helps plan various aspects of projects. Each project has a color assigned to it, and there may be multiple items on the schedule for each project. Each item on the schedule is represented by a label control, and I am setting the background and foreground colors on those labels. I have two color related questions I would appreciate assistance with.
1. I would like the label forecolor to always be black or white. I need some method for determining when a label's background color is dark enough that a white foreground (text) would be more visible than if the forecolor was black, or vice-versa.
2. If I can't find a good solution to item #1, then I would like some method for limiting the items background colors to only colors "light" enough to look ok with black text. I have tried to use luminesence, but colors with a high luminesence and a high saturation still sometimes look poorly with black text.
Thanks for any ideas you might have!!
2007-02-17
16:26:13
·
2 answers
·
asked by
Lazirell
2
in
Computers & Internet
➔ Programming & Design