Random colour

David Squance squance at elkvalley.net
Mon Jun 9 22:43:00 EDT 2003


Thanks for the suggestions.  Wilhelm's script below works quite nicely, but
a few pairings are rather muddy looking.  I think I may use it to generate
a couple of lists of a few dozen combinations which I think are quite
readable, and choose randomly from the lists as Rick and Emmanuel suggested.
Dave

>> Is there a simple way to randomize color of text and background of a
>> field
>
>" put random(256) - 1 into R
> put random(256) - 1 into G
> put random(256) - 1 into B
> set the forecolor of fld 1 to R,G,B
> put 255 - R into R
> put 255 - G into G
> put 255 - B into B
> set the backcolor of fld 1 to R,G,B"







More information about the use-livecode mailing list