Color Random { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Color.Random property provides a convenient way to obtain a random color from a predefined set of 8 colors. This property is static, meaning it can be accessed without creating an instance of the Color struct.

Usage

To use the Color.Random property, simply access it directly from the Color struct. This will return a Color object representing one of the 8 preset colors.

Example

// Example of using Color.Random
Color randomColor = Color.Random;

// Use the random color in your application
// For example, setting a material color
Material myMaterial = new Material();
myMaterial.Color = randomColor;