Random colour

Rick Harrison harrison at all-auctions.com
Mon Jun 9 12:12:00 EDT 2003


On Monday, June 9, 2003, at 12:16  PM, David Squance wrote:

> Is there a simple way to randomize color of text and background of a 
> field
> without getting a combination which is unreadable?

First I think you will have to decide for yourself which combinations 
are
not readable.  Then you'll have to set up a table which defines what 
those
unacceptable combinations are.  Pick your random colors next and check
it against the data in your table.  If the combination is not on the 
table then
it is OK to use it, otherwise pick another color.

The only other method might involve something like checking to see if 
the
color values are pretty far from each other.  More contrast is best.

Perhaps others have some other ideas.

Good luck!

Rick Harrison




More information about the use-livecode mailing list