This commit is contained in:
sc committed 2022-03-01 00:24:34 +08:00
commit cdacdee4a3
1 file changed
+3 -3
+3 -3
View File
@@ -11,7 +11,8 @@ namespace Audit.ConvertMoels
{
/// <summary>
///
/// RGB色彩数值转换器
/// 将色彩数值转换为ARGB代码返回
/// </summary>
public class ColorSQLConvert : IValueConverter
{
@@ -23,7 +24,7 @@ namespace Audit.ConvertMoels
if (value != null)
{
string colorValue = string.Format("{0:X6}", (int)value);//十进制RGB数值转十六进制六位RGB并补0位例“C0C0C0”
//string StuffColor = "#FF" + colorValue;//RGB数值拼接为ARGB数值
//string StuffColor = "#FF" + colorValue;//RGB数值拼接为ARGB数值(正向)
string StuffColor_B = colorValue.Substring(0, 2);//获取蓝色参数
string StuffColor_G = colorValue.Substring(2, 2);//获取绿色参数
string StuffColor_R = colorValue.Substring(4, 2);//获取红色参数
@@ -36,7 +37,6 @@ namespace Audit.ConvertMoels
}
}
/// <summary>
///
/// </summary>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{