internal static string GetOpacityPostfix(ThemeColorOpacity opacity) { var type = typeof(ThemeColorOpacity); var fieldInfo = type.GetField(opacity.ToString()); return(fieldInfo?.GetCustomAttribute <PostfixAttribute>()?.Value); }
private string GeneratePath(ThemeColor color, ThemeColorOpacity opacity) { var result = nameof(Theme.Brushes) + "." + color; if (opacity > ThemeColorOpacity.None) { result += Color.GetOpacityPostfix(opacity); } return(result); }