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 that represents the minimum of each component (red, green, blue, and alpha) from the two input colors.
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 that represents the minimum of each component (red, green, blue, and alpha) from the two input colors.
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.
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 minColor = Color.Min(ref color1, ref color2); // minColor will have the values (0.3f, 0.7f, 0.2f, 0.8f)