Description
The Color32.Min
method is a static method that returns a new Color32
instance. This instance is created by taking the minimum value of each color component (red, green, blue, and alpha) from two given Color32
instances. This method is useful for determining the darkest color between two colors on a per-component basis.
Usage
To use the Color32.Min
method, you need to pass two Color32
instances as parameters. The method will compare each component of the two colors and return a new Color32
instance with the minimum values for each component.
Example
// Example usage of Color32.Min method
Color32 color1 = new Color32 { r = 100, g = 150, b = 200, a = 255 };
Color32 color2 = new Color32 { r = 50, g = 200, b = 100, a = 255 };
Color32 minColor = Color32.Min(color1, color2);
// minColor will have the values: r = 50, g = 150, b = 100, a = 255