static Color Min( Color& a, Color& b )

book_4_sparkGenerated
code_blocksInput

Description

The Color.Min method is a static method that returns a new Color instance. It takes two Color references as parameters and returns a color composed of the minimum values of each component (red, green, blue, and alpha) from the two input colors.

Usage

Use the Color.Min method when you need to determine the minimum color values between two colors. This can be useful in scenarios where you want to find the darkest or least saturated color between two options.

Example

Color color1 = new Color(0.5f, 0.7f, 0.2f, 1.0f);
Color color2 = new Color(0.3f, 0.9f, 0.4f, 0.8f);
Color resultColor = Color.Min(ref color1, ref color2);
// resultColor will have the values (0.3f, 0.7f, 0.2f, 0.8f)