The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Declaration:[1] function RandomColor: TColor;
[2] function RandomColor (RedMin, RedMax, GreenMin, GreenMax, BlueMin, BlueMax: byte): TColor;

The function RandomColor returns a random color which is deducted from the built-in random generator. Thus you have to use Randomize before calling RandomColor the first time in order to avoid identical sequences of "random" colors.

There are two overloaded versions available: version [1] always spans the entire color range; version [2] can be restricted to a color range defined by the parameters RedMin, RedMax, GreenMin, GreenMax, BlueMin, and BlueMax.

Last Update: 2014-Aug-13