Example #1
0
        internal static void ToColorSpace(IRgb color, IHsb item)
        {
            var hsl = new Hsl();

            HslConverter.ToColorSpace(color, hsl);

            item.H = hsl.H;
            item.S = hsl.S;
            item.B = hsl.L;
        }
Example #2
0
        internal static IRgb ToColor(IHsb item)
        {
            var hsl = new Hsl
            {
                H = item.H,
                S = item.S,
                L = item.B
            };

            return(HslConverter.ToColor(hsl));
        }
Example #3
0
 public override IRgb ToRgb()
 {
     return(HslConverter.ToColor(this));
 }
Example #4
0
 public override void Initialize(IRgb color)
 {
     HslConverter.ToColorSpace(color, this);
 }