using ColorHelper;
using ColorConverter = ColorHelper.ColorConverter;
namespace Terminal.Gui.Views;
///
/// A bar representing the Hue component of a in HSL color space.
///
internal class HueBar : ColorBar
{
///
protected override Color GetColor (double fraction)
{
var hsl = new HSL ((int)(MaxValue * fraction), 100, 50);
RGB rgb = ColorConverter.HslToRgb (hsl);
return new (rgb.R, rgb.G, rgb.B);
}
///
protected override int MaxValue => 360;
}