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:
Matthew Leibowitz 2016-09-02 00:01:03 +02:00
Родитель 555a626395
Коммит 444fbf9179
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -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