Impossible question?

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.
 
D

Douglas J. Steele

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.
 
J

John Welch

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?
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top