diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-13 17:16:24 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-13 17:16:24 +0100 |
| commit | fda39ed7506551ab48dce271cb2d5e9c63f2b00c (patch) | |
| tree | d0ed602830692962c044f0614639a0939caa03f6 /src/GraphicObjects/ColorPicker.cs | |
| parent | 80dc0221c3455a50b8877f19c4a19043af0042f4 (diff) | |
limit to html safe color plus several ones, crowIDE wip
Diffstat (limited to 'src/GraphicObjects/ColorPicker.cs')
| -rw-r--r-- | src/GraphicObjects/ColorPicker.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/GraphicObjects/ColorPicker.cs b/src/GraphicObjects/ColorPicker.cs index ee0d31da..cc955191 100644 --- a/src/GraphicObjects/ColorPicker.cs +++ b/src/GraphicObjects/ColorPicker.cs @@ -165,11 +165,12 @@ namespace Crow NotifyValueChanged ("SelectedColorName", n); else NotifyValueChanged ("SelectedColorName", "-"); - 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")); + string tmp = ((int)Math.Round (R)).ToString ("X2") + + ((int)Math.Round (G)).ToString ("X2") + + ((int)Math.Round (B)).ToString ("X2"); + if (curColor.A < 1.0) + tmp += ((int)Math.Round (A)).ToString ("X2"); + NotifyValueChanged ("HexColor", tmp); } void notifyRGBAHasChanged(){ NotifyValueChanged ("R", R); |