public static Color GetColor(this ColorComponent colorComponent) { return((typeof(ColorComponent) .GetRuntimeField(colorComponent.ToString()) .GetCustomAttributes(typeof(ColorAttribute), false) .First() as ColorAttribute).Color); }