2009-10-20 Chris Toshok <toshok@ximian.com>
[moon.git] / src / mkcolor.cs
blob54c853f31d77c308466fd308daeecbcd8af71fa7
1 // mcs mkcolor.cs -pkg:dotnet
2 using System;
3 using System.Drawing;
4 using System.Reflection;
5 using System.Text;
7 class Program {
8 static void Main ()
10 PropertyInfo [] properties = typeof (Color).GetProperties (BindingFlags.Public | BindingFlags.Static);
11 // { "black", 0xFF000000 },
12 foreach (PropertyInfo pi in properties) {
13 Color color = Color.FromName (pi.Name);
14 Console.WriteLine ("\t{{ \"{0}\",\t\t0x{1:X2}{2:X2}{3:X2}{4:X2} }},", pi.Name.ToLower (), color.A, color.R, color.G, color.B);