Skip to content

Commit 6110f55

Browse files
committed
Fix display of color code
Fixes #1546
1 parent fa55593 commit 6110f55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MainDemo.Wpf/Converters/BrushToHexConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class BrushToHexConverter : IValueConverter
1010
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
1111
{
1212
if (value == null) return null;
13-
string lowerHexString(int i) => i.ToString("X").ToLower();
13+
string lowerHexString(int i) => i.ToString("X2").ToLower();
1414
var brush = (SolidColorBrush)value;
1515
var hex = lowerHexString(brush.Color.R) +
1616
lowerHexString(brush.Color.G) +

0 commit comments

Comments
 (0)