static Color32 Max( Color32 a, Color32 b )

robot_2Generated
code_blocksInput

Description

The Color32.Max method is a static method that returns a new Color32 instance representing the maximum color values between two given Color32 instances. This method compares each color component (red, green, blue, and alpha) of the two input colors and selects the maximum value for each component to form the resulting color.

Usage

Use the Color32.Max method when you need to determine the maximum color values between two Color32 instances. This can be useful in scenarios where you want to blend colors by taking the brightest component from each color.

Example

// Example usage of Color32.Max method
Color32 color1 = new Color32 { r = 100, g = 150, b = 200, a = 255 };
Color32 color2 = new Color32 { r = 120, g = 140, b = 210, a = 250 };

Color32 maxColor = Color32.Max(color1, color2);

// maxColor will have the values: r = 120, g = 150, b = 210, a = 255