Added Hue to SKColor.
Not adding Saturation as this is very different depending on whether the HSV or HSL was used. Also not adding the Value or the Lightness properties as this can be obtained from the various ToXXX methods
This commit is contained in:
Родитель
555a626395
Коммит
444fbf9179
|
@ -128,6 +128,14 @@ namespace SkiaSharp
|
|||
public byte Green => (byte)((color >> 8) & 0xff);
|
||||
public byte Blue => (byte)((color) & 0xff);
|
||||
|
||||
public float Hue {
|
||||
get {
|
||||
float h, s, v;
|
||||
ToHsv (out h, out s, out v);
|
||||
return h;
|
||||
}
|
||||
}
|
||||
|
||||
public static SKColor FromHsl (float h, float s, float l, byte a = 255)
|
||||
{
|
||||
// convert from percentages
|
||||
|
|
Загрузка…
Ссылка в новой задаче