Color Structure

An ARGB color.

Definition

Namespace: Avalonia.Media
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public readonly struct Color : IEquatable<Color>
Inheritance
Object    ValueType    Color
Implements
IEquatableColor

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 ValueTypeEquals(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.
GetHashCodeReturns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
Parse(ReadOnlySpanChar) 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 ValueTypeToString)
ToUInt32 Returns the integer representation of the color.
TryParse(ReadOnlySpanChar, 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

See Also