diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 09f024255..5417a6744 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -655,6 +655,7 @@ finalizer findfast findstr FIXEDFILEINFO +FFAA FLASHZONES FLASHZONESONQUICKSWITCH flt diff --git a/src/modules/colorPicker/ColorPickerUI/Helpers/ColorRepresentationHelper.cs b/src/modules/colorPicker/ColorPickerUI/Helpers/ColorRepresentationHelper.cs index e7bbbf1f9..8fafa440c 100644 --- a/src/modules/colorPicker/ColorPickerUI/Helpers/ColorRepresentationHelper.cs +++ b/src/modules/colorPicker/ColorPickerUI/Helpers/ColorRepresentationHelper.cs @@ -77,7 +77,7 @@ namespace ColorPicker.Helpers /// The see cref="Color"/> for the hexadecimal presentation /// A hexadecimal representation of a RGB color private static string ColorToHex(Color color) - => $"#{color.R.ToString("X2", CultureInfo.InvariantCulture)}" + => $"{color.R.ToString("X2", CultureInfo.InvariantCulture)}" + $"{color.G.ToString("X2", CultureInfo.InvariantCulture)}" + $"{color.B.ToString("X2", CultureInfo.InvariantCulture)}"; diff --git a/src/modules/colorPicker/ColorPickerUI/ViewModels/ColorEditorViewModel.cs b/src/modules/colorPicker/ColorPickerUI/ViewModels/ColorEditorViewModel.cs index 03966566b..87ed3edae 100644 --- a/src/modules/colorPicker/ColorPickerUI/ViewModels/ColorEditorViewModel.cs +++ b/src/modules/colorPicker/ColorPickerUI/ViewModels/ColorEditorViewModel.cs @@ -148,7 +148,9 @@ namespace ColorPicker.ViewModels new ColorFormatModel() { FormatName = ColorRepresentationType.HEX.ToString(), - Convert = (Color color) => { return ColorRepresentationHelper.GetStringRepresentationFromMediaColor(color, ColorRepresentationType.HEX); }, +#pragma warning disable CA1304 // Specify CultureInfo + Convert = (Color color) => { return ColorRepresentationHelper.GetStringRepresentationFromMediaColor(color, ColorRepresentationType.HEX).ToLower(); }, +#pragma warning restore CA1304 // Specify CultureInfo }); _allColorRepresentations.Add( diff --git a/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorRepresentationHelperTest.cs b/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorRepresentationHelperTest.cs index 4030de319..5b1f26f91 100644 --- a/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorRepresentationHelperTest.cs +++ b/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorRepresentationHelperTest.cs @@ -14,7 +14,7 @@ namespace Microsoft.ColorPicker.UnitTests { [TestMethod] [DataRow(ColorRepresentationType.CMYK, "cmyk(0%, 0%, 0%, 100%)")] - [DataRow(ColorRepresentationType.HEX, "#000000")] + [DataRow(ColorRepresentationType.HEX, "000000")] [DataRow(ColorRepresentationType.NCol, "R0, 0%, 100%")] [DataRow(ColorRepresentationType.HSB, "hsb(0, 0%, 0%)")] [DataRow(ColorRepresentationType.HSI, "hsi(0, 0%, 0%)")] diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/ColorPickerViewModel.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/ColorPickerViewModel.cs index ba4a75673..e69324ea4 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/ColorPickerViewModel.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/ColorPickerViewModel.cs @@ -45,7 +45,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels SelectableColorRepresentations = new Dictionary { { ColorRepresentationType.CMYK, "CMYK - cmyk(100%, 50%, 75%, 0%)" }, - { ColorRepresentationType.HEX, "HEX - #FFAA00" }, + { ColorRepresentationType.HEX, "HEX - ffaa00" }, { ColorRepresentationType.HSB, "HSB - hsb(100, 50%, 75%)" }, { ColorRepresentationType.HSI, "HSI - hsi(100, 50%, 75%)" }, { ColorRepresentationType.HSL, "HSL - hsl(100, 50%, 75%)" }, @@ -199,7 +199,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels var cielabFormatName = ColorRepresentationType.CIELAB.ToString(); var ciexyzFormatName = ColorRepresentationType.CIEXYZ.ToString(); - formatsUnordered.Add(new ColorFormatModel(hexFormatName, "#EF68FF", visibleFormats.ContainsKey(hexFormatName) && visibleFormats[hexFormatName])); + formatsUnordered.Add(new ColorFormatModel(hexFormatName, "ef68ff", visibleFormats.ContainsKey(hexFormatName) && visibleFormats[hexFormatName])); formatsUnordered.Add(new ColorFormatModel(rgbFormatName, "rgb(239, 104, 255)", visibleFormats.ContainsKey(rgbFormatName) && visibleFormats[rgbFormatName])); formatsUnordered.Add(new ColorFormatModel(hslFormatName, "hsl(294, 100%, 70%)", visibleFormats.ContainsKey(hslFormatName) && visibleFormats[hslFormatName])); formatsUnordered.Add(new ColorFormatModel(hsvFormatName, "hsv(294, 59%, 100%)", visibleFormats.ContainsKey(hsvFormatName) && visibleFormats[hsvFormatName]));