Generating Random Colors

Two functions are available to generate random colors.  They are random_color and random_extended_color.  This help page briefly describes these functions.  

 

The graphics window need NOT be open to use these functions, and neither function takes any arguments.

 

Random_Color

 

Random_Color returns a randomly-generated value from 0 to 15 representing one of the named colors (Black, Blue, Green, Cyan, Red, Magenta, Brown, Light_Gray, Dark_Gray, Light_Blue, Light_Green, Light_Cyan, Light_Red, Light_Magenta, Yellow, White).

 

Example (in a call symbol)

 

Display_Text(100,100,"Message",Random_Color)

 

 

Random_Extended_Color

 

Random_Extended_Color returns a randomly-generated extended color value between 0 and 241.

 

Example (in a call symbol)

 

Display_Number(100,100,Score,Random_Extended_Color)