Custom color set in the color dialog are supposed to be set to {Blue, Blue} using the following code:
colorDialog1.CustomColors = new int[] { System.Drawing.Colo
You need to use OLE colors. The simplist way to achieve this is using the built in ColorTranslator
object, e.g.
colorDialog1.CustomColors = new int[] {
ColorTranslator.ToOle(Color.Blue),
ColorTranslator.ToOle(Color.Red)
};
colorDialog1.ShowDialog();
If you need to convert from HTML colors, you can also use the ColorTranslator.FromHtml
method, e.g.
colorDialog1.CustomColors = new int[]
{
ColorTranslator.ToOle(Color.Blue),
ColorTranslator.ToOle(ColorTranslator.FromHtml("#FF0000"))
};