Color Struct

Summary

An ARGB color.
Namespace
Avalonia.Media
Interfaces
Base Types
  • object
  • ValueType
graph BT Type-->Base0["ValueType"] Base0-->Base1["object"] Type-.->Interface0["IEquatable<Color>"] Type["Color"] class Type type-node

Syntax

public readonly struct Color : ValueType, IEquatable<Color>

Constructors

Properties

Name Value Summary
A byte
Gets the Alpha component of the color.
B byte
Gets the Blue component of the color.
G byte
Gets the Green component of the color.
R byte
Gets the Red component of the color.

Methods

Name Value Summary
Equals(Color) bool
Check if two colors are equal.
Equals(object) bool
FromArgb(byte, byte, byte, byte) Color
Creates a Color from alpha, red, green and blue components.
static
FromRgb(byte, byte, byte) Color
Creates a Color from red, green and blue components.
static
FromUInt32(uint) Color
Creates a Color from an integer.
static
GetHashCode() int
Parse(ReadOnlySpan<char>) Color
Parses a color string.
static
Parse(string) Color
Parses a color string.
static
ToString() string
Returns the string representation of the color.
ToUint32() uint
Returns the integer representation of the color.
TryParse(ReadOnlySpan<char>, Color) bool
Parses a color string.
static
TryParse(string, Color) bool
Parses a color string.
static

Operators

Name Value Summary
operator !=(Color, Color) bool
operator ==(Color, Color) bool