Skip to main content

Struct SKColor

Namespace: SkiaSharp
Assembly: VelloSharp.Skia.Core.dll

public readonly struct SKColor : IEquatable<SKColor>

Implements

IEquatable<SKColor>

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

SKColor(byte, byte, byte, byte)

public SKColor(byte red, byte green, byte blue, byte alpha = 255)

Parameters

red byte

green byte

blue byte

alpha byte

Properties

Alpha

public byte Alpha { get; }

Property Value

byte

Blue

public byte Blue { get; }

Property Value

byte

Green

public byte Green { get; }

Property Value

byte

Red

public byte Red { get; }

Property Value

byte

Methods

Equals(SKColor)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(SKColor other)

Parameters

other SKColor

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object?

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

FromArgb(byte, byte, byte, byte)

public static SKColor FromArgb(byte alpha, byte red, byte green, byte blue)

Parameters

alpha byte

red byte

green byte

blue byte

Returns

SKColor

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToRgbaColor()

public RgbaColor ToRgbaColor()

Returns

RgbaColor

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(SKColor, SKColor)

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

Parameters

left SKColor

right SKColor

Returns

bool

operator !=(SKColor, SKColor)

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

Parameters

left SKColor

right SKColor

Returns

bool