The requirement was to have a list of the system colors to chose from, a list of the "web" colors, AKA the professional colors, and then RGB via R,G,B syntax, and finally the use of the color picker control for completeness.
I save the list of colors and system color properties for use later. The ReduceName(color) removes the "Color [Name]" components from the string. If you don't maintain a running list of the colors, you will have them show up twice in the second list. There is probably a more elegant approach to handling that, but time was more important than perfect, as is often the case.
_ListAllColors = new List<Color>();
_SystemColorProperties = typeof(SystemColors).GetProperties();
foreach (PropertyInfo propertyInfo in _SystemColorProperties)
{
object colorObject = propertyInfo.GetValue(null, null);
Color color = (Color)colorObject;
if (!_ListAllColors.Contains(color))
{
systemColorsComboBox.Items.Add(ReduceName(color));
_ListAllColors.Add(color);
}
}
foreach (KnownColor colorValue in Enum.GetValues(typeof(KnownColor)))
{
Color color = Color.FromKnownColor(colorValue);
if (!_ListAllColors.Contains(color))
{
professionalColorsComboBox.Items.Add(ReduceName(color));
_ListAllColors.Add(color);
}
}

