Esempio n. 1
0
        public static RGBColor ToRgb(this State state)
        {
            HSB hsb = new HSB();

            hsb.Brightness = state.Brightness;
            if (state.Hue.HasValue)
            {
                hsb.Hue = state.Hue.Value;
            }

            if (state.Saturation.HasValue)
            {
                hsb.Saturation = state.Saturation.Value;
            }

            return(hsb.GetRGB());
        }
        public static RGBColor ToRgb(this State state)
        {
            HSB hsb = new HSB(state.Hue ?? 0, state.Saturation ?? 0, state.Brightness);

            return(hsb.GetRGB());
        }