Struct RColor
- Namespace
- TheArtOfDev.HtmlRenderer.Adapters.Entities
- Assembly
- StockSharp.Xaml.dll
Represents an ARGB (alpha, red, green, blue) color.
public struct RColor
- Inherited Members
- Extension Methods
Fields
Empty
Represents a color that is null.
public static readonly RColor Empty
Field Value
Properties
A
Gets the alpha component value of this RColor structure.
public byte A { get; }
Property Value
B
Gets the blue component value of this RColor structure.
public byte B { get; }
Property Value
Black
Gets a system-defined color that has an ARGB value of #FF000000.
public static RColor Black { get; }
Property Value
G
Gets the green component value of this RColor structure.
public byte G { get; }
Property Value
IsEmpty
Specifies whether this RColor structure is uninitialized.
public bool IsEmpty { get; }
Property Value
- bool
This property returns true if this color is uninitialized; otherwise, false.
LightGray
Gets a system-defined color that has an ARGB value of #FFD3D3D3.
public static RColor LightGray { get; }
Property Value
R
Gets the red component value of this RColor structure.
public byte R { get; }
Property Value
Transparent
Gets a system-defined color.
public static RColor Transparent { get; }
Property Value
White
Gets a system-defined color that has an ARGB value of #FFFFFFFF.
public static RColor White { get; }
Property Value
WhiteSmoke
Gets a system-defined color that has an ARGB value of #FFF5F5F5.
public static RColor WhiteSmoke { get; }
Property Value
Methods
Equals(object)
Tests whether the specified object is a RColor structure and is equivalent to this RColor structure.
public override bool Equals(object obj)
Parameters
obj
objectThe object to test.
Returns
FromArgb(int, int, int)
Creates a RColor structure from the specified 8-bit color values (red, green, and blue). The alpha value is implicitly 255 (fully opaque). Although this method allows a 32-bit value to be passed for each color component, the value of each component is limited to 8 bits.
public static RColor FromArgb(int red, int green, int blue)
Parameters
red
intThe red component value for the new RColor. Valid values are 0 through 255.
green
intThe green component value for the new RColor. Valid values are 0 through 255.
blue
intThe blue component value for the new RColor. Valid values are 0 through 255.
Returns
Exceptions
- ArgumentException
red
,green
, orblue
is less than 0 or greater than 255.
FromArgb(int, int, int, int)
Creates a RColor structure from the four ARGB component (alpha, red, green, and blue) values. Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits.
public static RColor FromArgb(int alpha, int red, int green, int blue)
Parameters
alpha
intThe alpha component. Valid values are 0 through 255.
red
intThe red component. Valid values are 0 through 255.
green
intThe green component. Valid values are 0 through 255.
blue
intThe blue component. Valid values are 0 through 255.
Returns
Exceptions
- ArgumentException
alpha
,red
,green
, orblue
is less than 0 or greater than 255.
GetHashCode()
Returns a hash code for this RColor structure.
public override int GetHashCode()
Returns
ToString()
Converts this RColor structure to a human-readable string.
public override string ToString()
Returns
Operators
operator ==(RColor, RColor)
Tests whether two specified RColor structures are equivalent.
public static bool operator ==(RColor left, RColor right)
Parameters
left
RColorThe RColor that is to the left of the equality operator.
right
RColorThe RColor that is to the right of the equality operator.
Returns
operator !=(RColor, RColor)
Tests whether two specified RColor structures are different.
public static bool operator !=(RColor left, RColor right)
Parameters
left
RColorThe RColor that is to the left of the inequality operator.
right
RColorThe RColor that is to the right of the inequality operator.