Exemplo n.º 1
0
        /// <summary>
        /// Checks if color scheme has that number of elements.
        /// </summary>
        /// <param name="c">Color scheme category</param>
        /// <param name="key">Name of color scheme</param>
        /// <param name="numberOfElements">Number of elements that column contains</param>
        /// <returns>Returns the index for the appropriate number of colors to access within color scheme.</returns>
        public static int ReturnIndexOfColorArray(ColorSchemeType c, string key, int numberOfElements)
        {
            int min = 0, max = 0;

            for (int i = 0; i < colorList[(int)c][key].Length; i++)
            {
                if (colorList[(int)c][key][i].Length < colorList[(int)c][key][min].Length)
                {
                    min = i;
                }

                if (colorList[(int)c][key][i].Length > colorList[(int)c][key][max].Length)
                {
                    max = i;
                }

                if (numberOfElements == colorList[(int)c][key][i].Length)
                {
                    return(i);
                }
            }

            if (numberOfElements < colorList[(int)c][key][min].Length)
            {
                return(min);
            }
            else
            {
                return(max);
            }
        }
Exemplo n.º 2
0
        public static ColorScheme CreateColorScheme(ColorRGB primaryColor, ColorSchemeType type)
        {
            switch (type)
            {
            case ColorSchemeType.Analogous:
                return(AnalogousColorScheme.FromColor(primaryColor));

            case ColorSchemeType.Complementary:
                return(ComplementaryColorScheme.FromColor(primaryColor));

            case ColorSchemeType.SplitComplementary:
                return(SplitComplementaryColorScheme.FromColor(primaryColor));

            case ColorSchemeType.Triadic:
                return(TriadicColorScheme.FromColor(primaryColor));

            case ColorSchemeType.Monochromatic:
                return(MonochromaticColorScheme.FromColor(primaryColor));

            case ColorSchemeType.Square:
                return(SquareColorScheme.FromColor(primaryColor));

            case ColorSchemeType.Rectangle:
                return(RectangleColorScheme.FromColor(primaryColor));

            default:
                throw new ArgumentException("Unsupported ColorSchemeType supplied " + type);
            }
        }
Exemplo n.º 3
0
        UIView CreateSwatchView(ColorRGB color, ColorSchemeType type, string title)
        {
            var labelHeight = 20d;
            var scheme      = ColorScheme.CreateColorScheme(color, type);
            var rowRect     = new CGRect(0, labelHeight, swatchSize, swatchSize);
            var colorView   = new UIView()
            {
                Frame = new CGRect(0, 0, scheme.Colors.Count * swatchSize, swatchSize + labelHeight)
            };

            var label = new UILabel
            {
                Text          = title,
                Font          = UIFont.SystemFontOfSize(8f),
                TextAlignment = UITextAlignment.Center,
                Frame         = new CGRect(0, 0, colorView.Frame.Width, labelHeight)
            };

            colorView.Add(label);

            for (int i = 0; i < scheme.Colors.Count; i++)
            {
                if (i > 0)
                {
                    rowRect.Offset(swatchSize, 0);
                }

                var colorRgb = (ColorRGB)scheme.Colors.Values.ElementAt(i);
                var swatch   = new ColorSwatchView(rowRect, colorRgb, colorRgb.ToHex());
                colorView.Add(swatch);
            }

            return(colorView);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Returns a color array for a specific color scheme
        /// </summary>
        /// <param name="c">Color scheme type</param>
        /// <param name="nameOfScheme">Name of color scheme</param>
        /// <param name="index">Index of color scheme. Specific for number of elements</param>
        /// <returns>Color array of specific color scheme</returns>
        public static Color[] ReturnColorArray(ColorSchemeType c, string nameOfScheme, int index)
        {
            List <Color> newList = new List <Color>();

            foreach (uint t in colorList[(int)c][nameOfScheme][index])
            {
                newList.Add(ConvertHexadecimalToColor(t));
            }

            return(newList.ToArray());
        }
Exemplo n.º 5
0
        void ColorSchemeUpdated(object sender, ColorSchemeType e)
        {
            Color PrimColor      = XFUtilities.GetColorFromInt(Preferences.Intstance.ColorScheme.PrimaryColor);
            Color PrimDarkColor  = XFUtilities.GetColorFromInt(Preferences.Intstance.ColorScheme.PrimaryDarkColor);
            Color PrimLightColor = XFUtilities.GetColorFromInt(Preferences.Intstance.ColorScheme.PrimaryLightColor);
            Color PrimTextcolor  = XFUtilities.GetColorFromInt(Preferences.Intstance.ColorScheme.PrimaryTextColor);
            Color AltTextColor   = XFUtilities.GetColorFromInt(Preferences.Intstance.ColorScheme.AltTextColor);



            //imgLogo.Source = ImageSource.FromResource("BabyStepz.Images." + Preferences.Intstance.ColorScheme.Logo);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Applies the specified color scheme and uses the specified raster to define the
        /// minimum and maximum to use for the scheme.
        /// </summary>
        /// <param name="schemeType"></param>
        /// <param name="raster"></param>
        public void ApplyScheme(ColorSchemeType schemeType, IRaster raster)
        {
            double min = raster.Minimum;
            double max = raster.Maximum;

            if (!raster.IsInRam)
            {
                GetValues(raster);
                min = Statistics.Minimum;
                max = Statistics.Maximum;
            }

            ApplyScheme(schemeType, min, max);
        }
Exemplo n.º 7
0
        void ColorSchemeUpdated(object sender, ColorSchemeType e)
        {
            Color colorButton    = XFUtilities.GetColorFromInt(Preferences.Intstance.ColorScheme.ButtonColor);
            Color colorMain      = XFUtilities.GetColorFromInt(Preferences.Intstance.ColorScheme.MainColor);
            Color colorHighlight = XFUtilities.GetColorFromInt(Preferences.Intstance.ColorScheme.HighlightColor);

            int j = 0;

            foreach (Button button in gridButtons.Children)
            {
                button.BackgroundColor = colorButton;
                button.TextColor       = colorHighlight;
                animations[j++]        = new Animation(v => button.BackgroundColor = GetBlendedColor(colorButton, colorMain, v), 0, 1);
            }

            imgLogo.Source = ImageSource.FromResource("DrumPad.Images." + Preferences.Intstance.ColorScheme.Logo);
        }
Exemplo n.º 8
0
        void ColorSchemeUpdated(object sender, ColorSchemeType e)
        {
            Color colorButton    = XFUtilities.GetColorFromInt(Preferences.Intstance.ColorScheme.ButtonColor);
            Color colorMain      = XFUtilities.GetColorFromInt(Preferences.Intstance.ColorScheme.MainColor);
            Color colorHighlight = XFUtilities.GetColorFromInt(Preferences.Intstance.ColorScheme.HighlightColor);

            int j = 0;

            foreach (Button button in gridButtons.Children)
            {
                button.BackgroundColor = colorButton;
                button.TextColor       = colorHighlight;
                animations[j++]        = new Animation(v => button.BackgroundColor = GetBlendedColor(colorButton, colorMain, v), 0, 1);
            }

            imgLogo.Source = ImageSource.FromResource("DBsampler.Images.skullxbones_back_transparant.png");
            imgName.Source = ImageSource.FromResource("DBsampler.Images.db_name_logo_on_black.png");
        }
Exemplo n.º 9
0
        private void QuickSchemeClicked(object sender, EventArgs e)
        {
            _ignoreRefresh = true;
            _newScheme.EditorSettings.NumBreaks = 2;
            nudCategoryCount.Value = 2;
            _ignoreRefresh         = false;

            if (sender is not ToolStripMenuItem mi)
            {
                return;
            }

            ColorSchemeType cs = (ColorSchemeType)Enum.Parse(typeof(ColorSchemeType), mi.Text);

            _newScheme.ApplyScheme(cs, _raster);
            UpdateTable();
            UpdateStatistics(true); // if the parameter is true, even on manual, the breaks are reset.
            breakSliderGraph1.Invalidate();
        }
Exemplo n.º 10
0
        public FormSaveSchemeAs(ColorSchemeType type)
        {
            InitializeComponent();

            _schemeType = type;
        }
Exemplo n.º 11
0
 /// <summary>
 /// Creates a new instance of the ColorSchemes class
 /// </summary>
 /// <param name="type">The type of color scheme to create</param>
 public ColorSchemes(ColorSchemeType type)
 {
     _type = type;
     List  = new List <ColorBlend>();
 }
Exemplo n.º 12
0
        /// <summary>
        /// Applies the specified color scheme and uses the specified raster to define the
        /// minimum and maximum to use for the scheme.
        /// </summary>
        /// <param name="schemeType"></param>
        /// <param name="raster"></param>
        public void ApplyScheme(ColorSchemeType schemeType, IRaster raster)
        {
            double min = raster.Minimum;
            double max = raster.Maximum;
            if (!raster.IsInRam)
            {
                GetValues(raster);
                min = Statistics.Minimum;
                max = Statistics.Maximum;
            }

            ApplyScheme(schemeType, min, max);
        }
Exemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ColorScheme"/> class using a predefined color scheme and the minimum and maximum specified
 /// from the raster itself.
 /// </summary>
 /// <param name="schemeType">The predefined scheme to use.</param>
 /// <param name="raster">The raster to obtain the minimum and maximum settings from.</param>
 public ColorScheme(ColorSchemeType schemeType, IRaster raster)
 {
     Configure();
     ApplyScheme(schemeType, raster);
 }
Exemplo n.º 14
0
        /// <summary>
        /// Returns dictionary
        /// Key: Name of color scheme
        /// Index: Index in which matches number of elements for that color scheme
        /// </summary>
        /// <param name="c">Type of color scheme</param>
        /// <param name="numberOfElements">Number of elements within row</param>
        /// <returns>Dictionary</returns>
        public static Dictionary <string, int> ReturnColorSchemeNamesWithNumberOfElements(ColorSchemeType c, int numberOfElements)
        {
            Dictionary <string, int> allColors = new Dictionary <string, int>();

            foreach (string k in colorList[(int)c].Keys)
            {
                allColors[k] = ReturnIndexOfColorArray(c, k, numberOfElements);
            }

            return(allColors);
        }
Exemplo n.º 15
0
        /// <summary>
        /// Applies the specified color scheme and uses the specified raster to define the
        /// minimum and maximum to use for the scheme.
        /// </summary>
        /// <param name="schemeType">ColorSchemeType</param>
        /// <param name="min">THe minimum value to use for the scheme</param>
        /// <param name="max">THe maximum value to use for the scheme</param>
        public void ApplyScheme(ColorSchemeType schemeType, double min, double max)
        {
            if (Categories == null)
            {
                Categories = new ColorCategoryCollection(this);
            }
            else
            {
                Categories.Clear();    
            }

            IColorCategory eqCat = null, low = null, high = null;
            if (min == max)
            {
                // Create one category
                eqCat = new ColorCategory(min, max) {Range = {MaxIsInclusive = true, MinIsInclusive = true}};
                eqCat.ApplyMinMax(EditorSettings);
                Categories.Add(eqCat);
            }
            else
            {
                // Create two categories
                low = new ColorCategory(min, (min + max) / 2) {Range = {MaxIsInclusive = true}};
                high = new ColorCategory((min + max) / 2, max) {Range = {MaxIsInclusive = true}};
                low.ApplyMinMax(EditorSettings);
                high.ApplyMinMax(EditorSettings);
                Categories.Add(low);
                Categories.Add(high);    
            }

            Color lowColor, midColor, highColor;
            int alpha = ByteRange(Convert.ToInt32(_opacity * 255F));
            switch (schemeType)
            {
                case ColorSchemeType.Summer_Mountains:
                    lowColor = Color.FromArgb(alpha, 10, 100, 10);
                    midColor = Color.FromArgb(alpha, 153, 125, 25);
                    highColor = Color.FromArgb(alpha, 255, 255, 255);
                    break;
                case ColorSchemeType.FallLeaves:
                    lowColor = Color.FromArgb(alpha, 10, 100, 10);
                    midColor = Color.FromArgb(alpha, 199, 130, 61);
                    highColor = Color.FromArgb(alpha, 241, 220, 133);
                    break;
                case ColorSchemeType.Desert:
                    lowColor = Color.FromArgb(alpha, 211, 206, 97);
                    midColor = Color.FromArgb(alpha, 139, 120, 112);
                    highColor = Color.FromArgb(alpha, 255, 255, 255);
                    break;
                case ColorSchemeType.Glaciers:
                    lowColor = Color.FromArgb(alpha, 105, 171, 224);
                    midColor = Color.FromArgb(alpha, 162, 234, 240);
                    highColor = Color.FromArgb(alpha, 255, 255, 255);
                    break;
                case ColorSchemeType.Meadow:
                    lowColor = Color.FromArgb(alpha, 68, 128, 71);
                    midColor = Color.FromArgb(alpha, 43, 91, 30);
                    highColor = Color.FromArgb(alpha, 167, 220, 168);
                    break;
                case ColorSchemeType.Valley_Fires:
                    lowColor = Color.FromArgb(alpha, 164, 0, 0);
                    midColor = Color.FromArgb(alpha, 255, 128, 64);
                    highColor = Color.FromArgb(alpha, 255, 255, 191);
                    break;
                case ColorSchemeType.DeadSea:
                    lowColor = Color.FromArgb(alpha, 51, 137, 208);
                    midColor = Color.FromArgb(alpha, 226, 227, 166);
                    highColor = Color.FromArgb(alpha, 151, 146, 117);
                    break;
                case ColorSchemeType.Highway:
                    lowColor = Color.FromArgb(alpha, 51, 137, 208);
                    midColor = Color.FromArgb(alpha, 214, 207, 124);
                    highColor = Color.FromArgb(alpha, 54, 152, 69);
                    break;
                default:
                    lowColor = midColor = highColor = Color.Transparent;
                    break;
            }

            if (eqCat != null)
            {
                eqCat.LowColor = eqCat.HighColor = lowColor;
            }
            else
            {
                Debug.Assert(low != null);
                Debug.Assert(high != null);

                low.LowColor = lowColor;
                low.HighColor = midColor;
                high.LowColor = midColor;
                high.HighColor = highColor;
            }

            OnItemChanged(this);
        }
Exemplo n.º 16
0
        /// <summary>
        /// Applies the specified color scheme and uses the specified raster to define the
        /// minimum and maximum to use for the scheme.
        /// </summary>
        /// <param name="schemeType"></param>
        /// <param name="min">THe minimum value to use for the scheme</param>
        /// <param name="max">THe maximum value to use for the scheme</param>
        public void ApplyScheme(ColorSchemeType schemeType, double min, double max)
        {
            if (Categories == null)
            {
                Categories = new ColorCategoryCollection(this);
            }
            int alpha = ByteRange(Convert.ToInt32(_opacity * 255F));
            // this part should be overridden in the type specific version

            Categories.Clear();
            IColorCategory low = new ColorCategory(min, (min + max) / 2);
            low.Range.MaxIsInclusive = true;
            IColorCategory high = new ColorCategory((min + max) / 2, max);
            high.Range.MaxIsInclusive = true;
            low.ApplyMinMax(EditorSettings);
            high.ApplyMinMax(EditorSettings);
            Categories.Add(low);
            Categories.Add(high);
            switch (schemeType)
            {
                case ColorSchemeType.Summer_Mountains:
                    low.LowColor = Color.FromArgb(alpha, 10, 100, 10);
                    low.HighColor = Color.FromArgb(alpha, 153, 125, 25);
                    high.LowColor = Color.FromArgb(alpha, 153, 125, 25);
                    high.HighColor = Color.FromArgb(alpha, 255, 255, 255);
                    break;
                case ColorSchemeType.FallLeaves:
                    low.LowColor = Color.FromArgb(alpha, 10, 100, 10);
                    low.HighColor = Color.FromArgb(alpha, 199, 130, 61);
                    high.LowColor = Color.FromArgb(alpha, 199, 130, 61);
                    high.HighColor = Color.FromArgb(alpha, 241, 220, 133);
                    break;
                case ColorSchemeType.Desert:
                    low.LowColor = Color.FromArgb(alpha, 211, 206, 97);
                    low.HighColor = Color.FromArgb(alpha, 139, 120, 112);
                    high.LowColor = Color.FromArgb(alpha, 139, 120, 112);
                    high.HighColor = Color.FromArgb(alpha, 255, 255, 255);
                    break;
                case ColorSchemeType.Glaciers:
                    low.LowColor = Color.FromArgb(alpha, 105, 171, 224);
                    low.HighColor = Color.FromArgb(alpha, 162, 234, 240);
                    high.LowColor = Color.FromArgb(alpha, 162, 234, 240);
                    high.HighColor = Color.FromArgb(alpha, 255, 255, 255);
                    break;
                case ColorSchemeType.Meadow:
                    low.LowColor = Color.FromArgb(alpha, 68, 128, 71);
                    low.HighColor = Color.FromArgb(alpha, 43, 91, 30);
                    high.LowColor = Color.FromArgb(alpha, 43, 91, 30);
                    high.HighColor = Color.FromArgb(alpha, 167, 220, 168);
                    break;
                case ColorSchemeType.Valley_Fires:
                    low.LowColor = Color.FromArgb(alpha, 164, 0, 0);
                    low.HighColor = Color.FromArgb(alpha, 255, 128, 64);
                    high.LowColor = Color.FromArgb(alpha, 255, 128, 64);
                    high.HighColor = Color.FromArgb(alpha, 255, 255, 191);
                    break;
                case ColorSchemeType.DeadSea:
                    low.LowColor = Color.FromArgb(alpha, 51, 137, 208);
                    low.HighColor = Color.FromArgb(alpha, 226, 227, 166);
                    high.LowColor = Color.FromArgb(alpha, 226, 227, 166);
                    high.HighColor = Color.FromArgb(alpha, 151, 146, 117);
                    break;
                case ColorSchemeType.Highway:
                    low.LowColor = Color.FromArgb(alpha, 51, 137, 208);
                    low.HighColor = Color.FromArgb(alpha, 214, 207, 124);
                    high.LowColor = Color.FromArgb(alpha, 214, 207, 124);
                    high.HighColor = Color.FromArgb(alpha, 54, 152, 69);
                    break;
                default:
                    break;
            }

            OnItemChanged(this);
        }
Exemplo n.º 17
0
 /// <summary>
 /// Creates a new instance of a color scheme using a predefined color scheme and the minimum and maximum specified
 /// from the raster itself
 /// </summary>
 /// <param name="schemeType">The predefined scheme to use</param>
 /// <param name="raster">The raster to obtain the minimum and maximum settings from</param>
 public ColorScheme(ColorSchemeType schemeType, IRaster raster)
 {
     Configure();
     ApplyScheme(schemeType, raster);
 }
Exemplo n.º 18
0
        /// <summary>
        /// Applies the specified color scheme and uses the specified raster to define the
        /// minimum and maximum to use for the scheme.
        /// </summary>
        /// <param name="schemeType">ColorSchemeType.</param>
        /// <param name="min">THe minimum value to use for the scheme.</param>
        /// <param name="max">THe maximum value to use for the scheme.</param>
        public void ApplyScheme(ColorSchemeType schemeType, double min, double max)
        {
            if (Categories == null)
            {
                Categories = new ColorCategoryCollection(this);
            }
            else
            {
                Categories.Clear();
            }

            IColorCategory eqCat = null, low = null, high = null;

            if (min == max)
            {
                // Create one category
                eqCat = new ColorCategory(min, max)
                {
                    Range = { MaxIsInclusive = true, MinIsInclusive = true }
                };
                eqCat.ApplyMinMax(EditorSettings);
                Categories.Add(eqCat);
            }
            else
            {
                // Create two categories
                low = new ColorCategory(min, (min + max) / 2)
                {
                    Range = { MaxIsInclusive = true }
                };
                high = new ColorCategory((min + max) / 2, max)
                {
                    Range = { MaxIsInclusive = true }
                };
                low.ApplyMinMax(EditorSettings);
                high.ApplyMinMax(EditorSettings);
                Categories.Add(low);
                Categories.Add(high);
            }

            Color lowColor, midColor, highColor;
            int   alpha = Utils.ByteRange(Convert.ToInt32(_opacity * 255F));

            switch (schemeType)
            {
            case ColorSchemeType.SummerMountains:
                lowColor  = Color.FromArgb(alpha, 10, 100, 10);
                midColor  = Color.FromArgb(alpha, 153, 125, 25);
                highColor = Color.FromArgb(alpha, 255, 255, 255);
                break;

            case ColorSchemeType.FallLeaves:
                lowColor  = Color.FromArgb(alpha, 10, 100, 10);
                midColor  = Color.FromArgb(alpha, 199, 130, 61);
                highColor = Color.FromArgb(alpha, 241, 220, 133);
                break;

            case ColorSchemeType.Desert:
                lowColor  = Color.FromArgb(alpha, 211, 206, 97);
                midColor  = Color.FromArgb(alpha, 139, 120, 112);
                highColor = Color.FromArgb(alpha, 255, 255, 255);
                break;

            case ColorSchemeType.Glaciers:
                lowColor  = Color.FromArgb(alpha, 105, 171, 224);
                midColor  = Color.FromArgb(alpha, 162, 234, 240);
                highColor = Color.FromArgb(alpha, 255, 255, 255);
                break;

            case ColorSchemeType.Meadow:
                lowColor  = Color.FromArgb(alpha, 68, 128, 71);
                midColor  = Color.FromArgb(alpha, 43, 91, 30);
                highColor = Color.FromArgb(alpha, 167, 220, 168);
                break;

            case ColorSchemeType.ValleyFires:
                lowColor  = Color.FromArgb(alpha, 164, 0, 0);
                midColor  = Color.FromArgb(alpha, 255, 128, 64);
                highColor = Color.FromArgb(alpha, 255, 255, 191);
                break;

            case ColorSchemeType.DeadSea:
                lowColor  = Color.FromArgb(alpha, 51, 137, 208);
                midColor  = Color.FromArgb(alpha, 226, 227, 166);
                highColor = Color.FromArgb(alpha, 151, 146, 117);
                break;

            case ColorSchemeType.Highway:
                lowColor  = Color.FromArgb(alpha, 51, 137, 208);
                midColor  = Color.FromArgb(alpha, 214, 207, 124);
                highColor = Color.FromArgb(alpha, 54, 152, 69);
                break;

            default:
                lowColor = midColor = highColor = Color.Transparent;
                break;
            }

            if (eqCat != null)
            {
                eqCat.LowColor = eqCat.HighColor = lowColor;
            }
            else
            {
                Debug.Assert(low != null, "low may not be null");
                Debug.Assert(high != null, "high may not be null");

                low.LowColor   = lowColor;
                low.HighColor  = midColor;
                high.LowColor  = midColor;
                high.HighColor = highColor;
            }

            OnItemChanged(this);
        }
Exemplo n.º 19
0
 /// <summary>
 /// This creates a new scheme, applying the specified color scheme, and using the minimum and maximum values indicated.
 /// </summary>
 /// <param name="schemeType">The predefined color scheme</param>
 /// <param name="min">The minimum</param>
 /// <param name="max">The maximum</param>
 public ColorScheme(ColorSchemeType schemeType, double min, double max)
 {
     Configure();
     ApplyScheme(schemeType, min, max);
 }
Exemplo n.º 20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ColorScheme"/> class, applying the specified color scheme, and using the minimum and maximum values indicated.
 /// </summary>
 /// <param name="schemeType">The predefined color scheme.</param>
 /// <param name="min">The minimum.</param>
 /// <param name="max">The maximum.</param>
 public ColorScheme(ColorSchemeType schemeType, double min, double max)
 {
     Configure();
     ApplyScheme(schemeType, min, max);
 }
Exemplo n.º 21
0
        /// <summary>
        /// Applies the specified color scheme and uses the specified raster to define the
        /// minimum and maximum to use for the scheme.
        /// </summary>
        /// <param name="schemeType"></param>
        /// <param name="min">THe minimum value to use for the scheme</param>
        /// <param name="max">THe maximum value to use for the scheme</param>
        public void ApplyScheme(ColorSchemeType schemeType, double min, double max)
        {
            if (Categories == null)
            {
                Categories = new ColorCategoryCollection(this);
            }
            int alpha = ByteRange(Convert.ToInt32(_opacity * 255F));

            // this part should be overridden in the type specific version

            Categories.Clear();
            IColorCategory low = new ColorCategory(min, (min + max) / 2);

            low.Range.MaxIsInclusive = true;
            IColorCategory high = new ColorCategory((min + max) / 2, max);

            high.Range.MaxIsInclusive = true;
            low.ApplyMinMax(EditorSettings);
            high.ApplyMinMax(EditorSettings);
            Categories.Add(low);
            Categories.Add(high);
            switch (schemeType)
            {
            case ColorSchemeType.Summer_Mountains:
                low.LowColor   = Color.FromArgb(alpha, 10, 100, 10);
                low.HighColor  = Color.FromArgb(alpha, 153, 125, 25);
                high.LowColor  = Color.FromArgb(alpha, 153, 125, 25);
                high.HighColor = Color.FromArgb(alpha, 255, 255, 255);
                break;

            case ColorSchemeType.FallLeaves:
                low.LowColor   = Color.FromArgb(alpha, 10, 100, 10);
                low.HighColor  = Color.FromArgb(alpha, 199, 130, 61);
                high.LowColor  = Color.FromArgb(alpha, 199, 130, 61);
                high.HighColor = Color.FromArgb(alpha, 241, 220, 133);
                break;

            case ColorSchemeType.Desert:
                low.LowColor   = Color.FromArgb(alpha, 211, 206, 97);
                low.HighColor  = Color.FromArgb(alpha, 139, 120, 112);
                high.LowColor  = Color.FromArgb(alpha, 139, 120, 112);
                high.HighColor = Color.FromArgb(alpha, 255, 255, 255);
                break;

            case ColorSchemeType.Glaciers:
                low.LowColor   = Color.FromArgb(alpha, 105, 171, 224);
                low.HighColor  = Color.FromArgb(alpha, 162, 234, 240);
                high.LowColor  = Color.FromArgb(alpha, 162, 234, 240);
                high.HighColor = Color.FromArgb(alpha, 255, 255, 255);
                break;

            case ColorSchemeType.Meadow:
                low.LowColor   = Color.FromArgb(alpha, 68, 128, 71);
                low.HighColor  = Color.FromArgb(alpha, 43, 91, 30);
                high.LowColor  = Color.FromArgb(alpha, 43, 91, 30);
                high.HighColor = Color.FromArgb(alpha, 167, 220, 168);
                break;

            case ColorSchemeType.Valley_Fires:
                low.LowColor   = Color.FromArgb(alpha, 164, 0, 0);
                low.HighColor  = Color.FromArgb(alpha, 255, 128, 64);
                high.LowColor  = Color.FromArgb(alpha, 255, 128, 64);
                high.HighColor = Color.FromArgb(alpha, 255, 255, 191);
                break;

            case ColorSchemeType.DeadSea:
                low.LowColor   = Color.FromArgb(alpha, 51, 137, 208);
                low.HighColor  = Color.FromArgb(alpha, 226, 227, 166);
                high.LowColor  = Color.FromArgb(alpha, 226, 227, 166);
                high.HighColor = Color.FromArgb(alpha, 151, 146, 117);
                break;

            case ColorSchemeType.Highway:
                low.LowColor   = Color.FromArgb(alpha, 51, 137, 208);
                low.HighColor  = Color.FromArgb(alpha, 214, 207, 124);
                high.LowColor  = Color.FromArgb(alpha, 214, 207, 124);
                high.HighColor = Color.FromArgb(alpha, 54, 152, 69);
                break;

            default:
                break;
            }

            OnItemChanged(this);
        }