SKColor Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
32-bit ARGB unpremultiplied color value.
public struct SKColor
public readonly struct SKColor : IEquatable<SkiaSharp.SKColor>
- Inheritance
-
SKColor
- Implements
Remarks
The color components are always in a known order.
Constructors
SKColor(Byte, Byte, Byte, Byte) |
Creates a color from the specified red, green, blue and alpha components. |
SKColor(Byte, Byte, Byte) |
Creates a color from the specified red, green and blue components. |
SKColor(UInt32) |
Creates a color from the specified integer. |
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
Equals(Object) |
Determines whether the specified object is equal to the current object. |
Equals(SKColor) |
Determines whether the specified object is equal to the current object. |
FromHsl(Single, Single, Single, Byte) |
Creates a color from the specified hue, saturation, lightness/luminosity and alpha values. |
FromHsv(Single, Single, Single, Byte) |
Creates a color from the specified hue, saturation, value/brightness and alpha values. |
GetHashCode() |
Serves as the default hash function. |
Parse(String) |
Converts the hexadecimal string representation of a color to its SKColor equivalent. |
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. |
TryParse(String, SKColor) |
Converts the hexadecimal string representation of a color to its SKColor equivalent. |
WithAlpha(Byte) |
Returns a new color based on this current instance, but with the new alpha channel value. |
WithBlue(Byte) |
Returns a new color based on this current instance, but with the new blue channel value. |
WithGreen(Byte) |
Returns a new color based on this current instance, but with the new green channel value. |
WithRed(Byte) |
Returns a new color based on this current instance, but with the new red channel value. |
Operators
Equality(SKColor, SKColor) |
Indicates whether two SKColor objects are equal. |
Explicit(SKColor to UInt32) |
Converts a SKColor to a UInt32. |
Implicit(UInt32 to SKColor) |
Converts a UInt32 to a SKColor. |
Inequality(SKColor, SKColor) |
Indicates whether two SKColor objects are different. |
Applies to
SkiaSharp