Color Structure
An ARGB color.
Definition
Namespace: Avalonia.Media
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public readonly struct Color : IEquatable<Color>
Public Structure Color
Implements IEquatable(Of Color)
[<SealedAttribute>]
type Color =
struct
inherit ValueType
interface IEquatable<Color>
end
| Inheritance | Object → ValueType → Color |
| Implements | IEquatable(Color) |
Constructors
| Color(Byte, Byte, Byte, Byte) | Initializes a new instance of the Color struct. |
Properties
| A | Gets the Alpha component of the color. |
| B | Gets the Blue component of the color. |
| G | Gets the Green component of the color. |
| R | Gets the Red component of the color. |
Methods
| Equals(Color) | Indicates whether the current object is equal to another object of the same type. |
| Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueType.Equals(Object)) |
| FromArgb(Byte, Byte, Byte, Byte) | Creates a Color from alpha, red, green and blue components. |
| FromRgb(Byte, Byte, Byte) | Creates a Color from red, green and blue components. |
| FromUInt32(UInt32) | Creates a Color from an integer. |
| GetHashCode() | Returns the hash code for this instance. (Overrides ValueType.GetHashCode()) |
| GetType() | Gets the Type of the current instance. (Inherited from Object) |
| Parse(ReadOnlySpan(Char)) | Parses a color string. |
| Parse(String) | Parses a color string. |
| ToHsl() | Returns the HSL color model equivalent of this RGB color. |
| ToHsl(Byte, Byte, Byte, Byte) | Converts the given RGBA color component values to their HSL color equivalent. |
| ToHsv() | Returns the HSV color model equivalent of this RGB color. |
| ToHsv(Byte, Byte, Byte, Byte) | Converts the given RGBA color component values to their HSV color equivalent. |
| ToString() | Returns the string representation of the color. (Overrides ValueType.ToString()) |
| ToUInt32() | Returns the integer representation of the color. |
| TryParse(ReadOnlySpan(Char), Color) | Parses a color string. |
| TryParse(String, Color) | Parses a color string. |
Operators
| Equality(Color, Color) | Indicates whether the values of two specified Color objects are equal. |
| Inequality(Color, Color) | Indicates whether the values of two specified Color objects are not equal. |
Extension Methods
| ToSKColor() | (Defined by SkiaSharpExtensions) |