Class ColorExtension
Namespace: AppMana.InteractionToolkit.MaterialUI
Static class with Color extension methods.
public static class ColorExtension
Inheritance
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Approximately(Color, Color, bool)
Uses Mathf.Approximately on the color level values of two colors to compare them.
public static bool Approximately(this Color thisColor, Color otherColor, bool compareAlpha = false)
Parameters
thisColor Color
The first Color to compare.
otherColor Color
The second Color to compare.
compareAlpha bool
Should the alpha levels also be compared?
Returns
True if the first Color is approximately the second Color, otherwise false.
WithAlpha(Color, float)
Gets a color with a specified alpha level.
public static Color WithAlpha(this Color color, float alpha)
Parameters
color Color
The color to get.
alpha float
The desired alpha level.
Returns
Color
A Color with 'rgb' values from color argument, and 'a' value from alpha argument.
