public void ToHSLWithWhiteReturnsCorrectValues() { var accent = new Color.RGB(255, 255, 255); var hsl = accent.ToHSL(); Assert.AreEqual(new Color.HSL(0, 0, 1), hsl); }
public void ToHSLWithAccentReturnsCorrectValues() { var accent = new Color.RGB(240, 150, 9); var hsl = accent.ToHSL(); Assert.AreEqual(new Color.HSL(36.6, 0.928, 0.488), hsl); }
public void ToHSLWithBlackReturnsCorrectValues() { var accent = new Color.RGB(0, 0, 0); var hsl = accent.ToHSL(); Assert.AreEqual(new Color.HSL(0, 0, 0), hsl); }
public EditColourViewModel(Color.RGB colour) { var hsl = colour.ToHSL(); Hue = hsl.H; Saturation = hsl.S; Lightness = hsl.L; }