Editar

Compartilhar via


SKColorF Struct

Definition

16-bit, floating-point, ARGB unpremultiplied color value.

public readonly struct SKColorF : IEquatable<SkiaSharp.SKColorF>
Inheritance
SKColorF
Implements

Remarks

The color components are always in a known order.

Constructors

SKColorF(Single, Single, Single, Single)

Creates a color from the specified red, green, blue and alpha components.

SKColorF(Single, Single, Single)

Creates a color from the specified red, green and blue components.

Fields

Empty

Gets an "empty" color, with zero for all the components.

Properties

Alpha

Gets the alpha component of the color.

Blue

Gets the blue component of the color.

Green

Gets the green component of the color.

Hue

Gets the hue value.

Red

Gets the red component of the color.

Methods

Clamp()

Clamp the color components in the range [0..1].

Equals(Object)

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

Equals(SKColorF)

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

FromHsl(Single, Single, Single, Single)

Creates a color from the specified hue, saturation, lightness/luminosity and alpha values.

FromHsv(Single, Single, Single, Single)

Creates a color from the specified hue, saturation, value/brightness and alpha values.

GetHashCode()

Serves as the default hash function.

ToHsl(Single, Single, Single)

Converts the current color into it's hue, saturation and lightness/luminosity values.

ToHsv(Single, Single, Single)

Converts the current color into it's hue, saturation and value/brightness values.

ToString()

Returns the color as a string in the format: #AARRGGBB.

WithAlpha(Single)

Returns a new color based on this current instance, but with the new alpha channel value.

WithBlue(Single)

Returns a new color based on this current instance, but with the new blue channel value.

WithGreen(Single)

Returns a new color based on this current instance, but with the new green channel value.

WithRed(Single)

Returns a new color based on this current instance, but with the new red channel value.

Operators

Equality(SKColorF, SKColorF)

Indicates whether two SKColorF objects are equal.

Explicit(SKColorF to SKColor)

Converts a SKColorF to a SKColor.

Implicit(SKColor to SKColorF)

Converts a SKColor to a SKColorF.

Inequality(SKColorF, SKColorF)

Indicates whether two SKColorF objects are different.

Applies to