ColorProperty color = new ColorProperty(Color.Gold);
ColorProperty hexColor = new ColorProperty("#00ff00");
ColorProperty argbFloatColor = new ColorProperty(0.4f, 1f, 0.4f, 1f);
ColorProperty rgbColor = new ColorProperty(255, 102, 0);
ColorProperty knownColor = new ColorProperty(KnownColor.Red);
ColorProperty argbColor = new ColorProperty(100, 210, 210, 210);
ColorProperty nameColor = new ColorProperty("blue");
Console.WriteLine(color);
Console.WriteLine(hexColor.ToString());
Console.WriteLine((Color) argbFloatColor.Value);
Console.WriteLine(rgbColor.Value.ToString());
Console.WriteLine(knownColor.Value == Color.FromKnownColor(KnownColor.Red));
Console.WriteLine(argbColor.Value == Color.FromArgb(100, 210, 210, 210));
Console.WriteLine(nameColor.Value == Color.FromName("blue"));
// Results:
// Color [Gold]
// Color [A=255, R=0, G=255, B=0]
// Color [A=102, R=255, G=102, B=255]
// Color [A=255, R=255, G=102, B=0]
// True
// True
// True
color = Color.Blue;
knownColor = KnownColor.Yellow;
hexColor = "#ff0000";
nameColor = "black";
Console.WriteLine(color);
Console.WriteLine(knownColor);
Console.WriteLine(hexColor);
Console.WriteLine(nameColor);
// Results:
// Color [Blue]
// Color [Yellow]
// Color [A=255, R=255, G=0, B=0]
// Color [Black]