Table of Contents

Struct ColorStruct

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

ColorStruct used inside the Color object in order to store color value. This structure stores color as BGRA and is compatible with SKColor.

[Serializable]
public struct ColorStruct

Constructors

ColorStruct()

Initializes a new instance of the ColorStruct struct.

ColorStruct(SKColor)

Initializes a new instance of the ColorStruct struct.

ColorStruct(byte, byte, byte)

Initializes a new instance of the ColorStruct with the specified parameters.

ColorStruct(byte, byte, byte, byte)

Initializes a new instance of the ColorStruct with the specified parameters.

ColorStruct(uint)

Initializes a new instance of the ColorStruct struct.

Fields

A

Gets or sets alpha component of the color.

B

Gets or sets blue component of the color.

Color

Gets or sets color as SKColor.

Default

Gets default value with all fields assigned to default values.

G

Gets or sets green component of the color.

R

Gets or sets red component of the color.

Value

Gets or sets color as uint.

Methods

Equals(object?)

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

GetHashCode()

Serves as the default hash function.

Operators

operator ==(ColorStruct, ColorStruct)

Tests whether two specified ColorStruct structures are equivalent.

explicit operator ColorStruct(Color)

Converts the specified Color to a ColorStruct.

implicit operator SKColor(ColorStruct)

Converts the specified SKColor to a ColorStruct.

implicit operator uint(ColorStruct)

Converts the specified ColorStruct to a uint.

implicit operator ColorStruct(SKColor)

Converts the specified SKColor to a ColorStruct.

implicit operator ColorStruct(uint)

Converts the specified uint to a ColorStruct.

implicit operator ColorStruct((byte, byte, byte, byte))

Implicit operator convertion from tuple with three byte values to Color. Tuple values define ARGB of the color.

implicit operator ColorStruct((byte, byte, byte))

Implicit operator convertion from tuple with three byte values to Color. Tuple values define RGB of the color.

operator !=(ColorStruct, ColorStruct)

Tests whether two specified ColorStruct structures are not equivalent.