New to Telerik UI for WPF? Start a free 30-day trial

RgbaColor

Struct

A struct representing a color comprised of Red, Green, Blue and Alpha channels.

Definition

Namespace:Telerik.Windows.Controls.ColorEditor.ColorSchemas

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public struct RgbaColor

Inherited Members ValueType.ToString()

Constructors

Initializes a new instance of the RgbaColor struct.

C#
public RgbaColor(Color color)
Parameters:colorColor

The color.

Initializes a new instance of the RgbaColor struct.

C#
public RgbaColor(double red, double green, double blue, double alpha)
Parameters:reddouble

The red channel.

greendouble

The green channel.

bluedouble

The blue channel.

alphadouble

The alpha channel.

Properties

Gets the alpha (opacity) channel of the RgbaColor instance.

C#
public double Alpha { get; }
Property Value:

The alpha channel.

Gets the blue channel of the RgbaColor instance.

C#
public double Blue { get; }
Property Value:

The blue channel.

Gets the green channel of the RgbaColor instance.

C#
public double Green { get; }
Property Value:

The green channel.

Gets the red channel of the RgbaColor instance.

C#
public double Red { get; }
Property Value:

The red channel.

Methods

Determines whether the specified object is equal to the current object.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

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

Overrides: ValueType.Equals(object)

Compares the two instance.

C#
public bool Equals(RgbaColor otherInstance)
Parameters:otherInstanceRgbaColor

The other instance.

Returns:

bool

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: ValueType.GetHashCode()

Operators

Implements the operator !=.

C#
public static bool operator !=(RgbaColor instance1, RgbaColor instance2)
Parameters:instance1RgbaColor

The instance1.

instance2RgbaColor

The instance2.

Returns:

bool

The result of the operator.

Implements the operator ==.

C#
public static bool operator ==(RgbaColor instance1, RgbaColor instance2)
Parameters:instance1RgbaColor

The instance1.

instance2RgbaColor

The instance2.

Returns:

bool

The result of the operator.

Extension Methods