Random colour
Wilhelm Sanke
sanke at hrz.uni-kassel.de
Mon Jun 9 17:48:01 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
As an addition to the suggestions you received so far: Use
*complementary* colors. This will produce positive results, i.e.
readable fields with sufficient contrast in at least 90 % of all cases.
" 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"
Regards,
Wilhelm Sanke
More information about the use-livecode
mailing list