New to Telerik Document ProcessingStart a free 30-day trial

Device RGB color with ARGB components for drawing content; use to specify red/green/blue values with optional transparency.

Definition

Namespace:Telerik.Windows.Documents.Fixed.Model.ColorSpaces

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

C#
public class RgbColor : SimpleColor, IEquatable<ColorBase>

Inheritance: objectColorBaseSimpleColorRgbColor

Implements: IEquatable<ColorBase>

Inherited Members ColorBase.Equals(object)

Constructors

Creates an RgbColor with default alpha (fully opaque).

C#
public RgbColor()

Creates an RgbColor from explicit ARGB components.

C#
public RgbColor(byte a, byte r, byte g, byte b)
Parameters:abyte

The alpha (transparency) component value (0-255), where 0 is fully transparent and 255 is fully opaque.

rbyte

The red component value (0-255).

gbyte

The green component value (0-255).

bbyte

The blue component value (0-255).

Creates an RgbColor from RGB components with default alpha (fully opaque).

C#
public RgbColor(byte r, byte g, byte b)
Parameters:rbyte

The red component value (0-255).

gbyte

The green component value (0-255).

bbyte

The blue component value (0-255).

Fields

Gets or sets the alpha (transparency) component, 0–255 (0 = transparent, 255 = opaque).

C#
public byte A
Field Value:

The alpha component value, where 0 represents fully transparent and 255 represents fully opaque.

Gets or sets the blue component, 0–255.

C#
public byte B
Field Value:

The blue component value.

Gets or sets the green component, 0–255.

C#
public byte G
Field Value:

The green component value.

Gets or sets the red component, 0–255.

C#
public byte R
Field Value:

The red component value.

Methods

Determines whether the specified color is equal to the current RGB color.

C#
public override bool Equals(ColorBase other)
Parameters:otherColorBase

The color to compare with the current color.

Returns:

bool

True if the specified color is equal to the current RGB color; otherwise, false.

Overrides: ColorBase.Equals(ColorBase)

Calculates a hash code for this RGB color instance based on its component values.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current RGB color.

Overrides: ColorBase.GetHashCode()

Returns a string representation of this RGB color showing its ARGB component values.

C#
public override string ToString()
Returns:

string

A string representation of the RGB color in the format "<A=alpha R=red G=green B=blue>".

Overrides: object.ToString()