Impossible question?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I think I have already answered this one in the title!!!

The users of my DB can select their own background picture for the main
form, Is it possible to detect the 'depth' of the background colour? i.e. If
the picture is dark blue, I would need the text to be white. If the picture
is white, I would need the text to be black?

I know I could give the users the option to change the text colour
themselves, but just wondered if maybe it is possible to do it
automatically.....

Thanx,
Steve.
 
The best you'd be able to do is detect the colour of a specific pixel. You
could sample a large number of pixels, and determine the average of all of
those pixels, but you'd still just be guessing at what the most appropriate
text colour should be.

My vote would be to allow the users to select the text colour they want.
 
Or, if you really want the automatic thing, could you give them a few
specific choices and have a table of text colors that correspond to each
background color?
 
Thanks for the replies.

I think I will give them the option to change the text colour. I have the
code for the 'Pallette' API call somewhere.....

Cheers,
Steve.
 
Back
Top