| 12345678910111213141516171819202122232425262728 |
- using System;
- using System.Windows.Media;
- namespace SHJX.Service.Common.UserColor
- {
- public static class UColor
- {
- public static SolidColorBrush SpringGreen => "#66CC99".ConvertToBrush();
- public static SolidColorBrush DarkOrange => "#FF9933".ConvertToBrush();
- public static SolidColorBrush DoderBlue => "#1296DB".ConvertToBrush();
- public static SolidColorBrush DeepSkyBlue => "#C800B2FF".ConvertToBrush();
- public static SolidColorBrush SteelBlue => "#2281D1".ConvertToBrush();
- public static SolidColorBrush LightOrange => "#FF6600".ConvertToBrush();
- public static SolidColorBrush OrangeRed=> "#FF4500".ConvertToBrush();
- private static readonly BrushConverter BrushConverter = new();
- public static SolidColorBrush ConvertToBrush(this string colorRgb)
- {
- if (string.IsNullOrWhiteSpace(colorRgb))
- {
- throw new ArgumentNullException(colorRgb);
- }
- return (SolidColorBrush)BrushConverter.ConvertFromString(colorRgb);
- }
- }
- }
|