Table of Contents

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

RColor

Properties

A

Gets the alpha component value of this RColor structure.

public byte A { get; }

Property Value

byte

B

Gets the blue component value of this RColor structure.

public byte B { get; }

Property Value

byte

Black

Gets a system-defined color that has an ARGB value of #FF000000.

public static RColor Black { get; }

Property Value

RColor

G

Gets the green component value of this RColor structure.

public byte G { get; }

Property Value

byte

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

RColor

R

Gets the red component value of this RColor structure.

public byte R { get; }

Property Value

byte

Transparent

Gets a system-defined color.

public static RColor Transparent { get; }

Property Value

RColor

White

Gets a system-defined color that has an ARGB value of #FFFFFFFF.

public static RColor White { get; }

Property Value

RColor

WhiteSmoke

Gets a system-defined color that has an ARGB value of #FFF5F5F5.

public static RColor WhiteSmoke { get; }

Property Value

RColor

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 object

The object to test.

Returns

bool

true if obj is a RColor structure equivalent to this RColor structure; otherwise, false.

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 int

The red component value for the new RColor. Valid values are 0 through 255.

green int

The green component value for the new RColor. Valid values are 0 through 255.

blue int

The blue component value for the new RColor. Valid values are 0 through 255.

Returns

RColor

The RColor that this method creates.

Exceptions

ArgumentException

red, green, or blue 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 int

The alpha component. Valid values are 0 through 255.

red int

The red component. Valid values are 0 through 255.

green int

The green component. Valid values are 0 through 255.

blue int

The blue component. Valid values are 0 through 255.

Returns

RColor

The RColor that this method creates.

Exceptions

ArgumentException

alpha, red, green, or blue is less than 0 or greater than 255.

GetHashCode()

Returns a hash code for this RColor structure.

public override int GetHashCode()

Returns

int

An integer value that specifies the hash code for this RColor.

ToString()

Converts this RColor structure to a human-readable string.

public override string ToString()

Returns

string

Operators

operator ==(RColor, RColor)

Tests whether two specified RColor structures are equivalent.

public static bool operator ==(RColor left, RColor right)

Parameters

left RColor

The RColor that is to the left of the equality operator.

right RColor

The RColor that is to the right of the equality operator.

Returns

bool

true if the two RColor structures are equal; otherwise, false.

operator !=(RColor, RColor)

Tests whether two specified RColor structures are different.

public static bool operator !=(RColor left, RColor right)

Parameters

left RColor

The RColor that is to the left of the inequality operator.

right RColor

The RColor that is to the right of the inequality operator.

Returns

bool

true if the two RColor structures are different; otherwise, false.