示例#1
0
        /// <summary>Loads the colors. </summary>
        private void LoadColors()
        {
            var colorsSection = _rules.GetSection("Colors");

            foreach (var entry in colorsSection.OrderedEntries)
            {
                string[] colorComponents = ((string)entry.Value).Split(',');
                var      h = new HsvColor(int.Parse(colorComponents[0]),
                                          int.Parse(colorComponents[1]),
                                          int.Parse(colorComponents[2]));
                _namedColors[entry.Key] = h.ToRGB();
            }
        }