aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/ColorPicker.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GraphicObjects/ColorPicker.cs')
-rw-r--r--src/GraphicObjects/ColorPicker.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GraphicObjects/ColorPicker.cs b/src/GraphicObjects/ColorPicker.cs
index 3a5ec23f..ee0d31da 100644
--- a/src/GraphicObjects/ColorPicker.cs
+++ b/src/GraphicObjects/ColorPicker.cs
@@ -165,7 +165,11 @@ namespace Crow
NotifyValueChanged ("SelectedColorName", n);
else
NotifyValueChanged ("SelectedColorName", "-");
- NotifyValueChanged ("HexColor", ((int)R).ToString ("X2") + ((int)G).ToString ("X2") + ((int)B).ToString ("X2") + ((int)A).ToString ("X2"));
+ NotifyValueChanged ("HexColor",
+ ((int)Math.Round(R)).ToString ("X2") +
+ ((int)Math.Round(G)).ToString ("X2") +
+ ((int)Math.Round(B)).ToString ("X2") +
+ ((int)Math.Round(A)).ToString ("X2"));
}
void notifyRGBAHasChanged(){
NotifyValueChanged ("R", R);