[ColorPicker] Add hexadecimal integer format (#21354)

* ColorPicker: Add hexadecimal integer format

* Fix typo: integral -> integer

* Rename as Hex Int
This commit is contained in:
Marius Bughiu
2022-10-30 22:07:33 +02:00
committed by GitHub
parent db191b8b75
commit 6431ccd370
5 changed files with 32 additions and 1 deletions

View File

@@ -65,6 +65,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ ColorRepresentationType.CIEXYZ, "CIE XYZ - xyz(56, 50, 7)" },
{ ColorRepresentationType.VEC4, "VEC4 - (1.0f, 0.7f, 0f, 1f)" },
{ ColorRepresentationType.DecimalValue, "Decimal - 16755200" },
{ ColorRepresentationType.HexInteger, "HEX Integer - 0xFFAA00EE" },
};
GeneralSettingsConfig = settingsRepository.SettingsConfig;
@@ -228,6 +229,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
var cielabFormatName = ColorRepresentationType.CIELAB.ToString();
var ciexyzFormatName = ColorRepresentationType.CIEXYZ.ToString();
var vec4FormatName = ColorRepresentationType.VEC4.ToString();
var hexIntegerFormatName = "HEX Int";
var decimalFormatName = "Decimal";
formatsUnordered.Add(new ColorFormatModel(hexFormatName, "ef68ff", visibleFormats.ContainsKey(hexFormatName) && visibleFormats[hexFormatName]));
@@ -243,6 +245,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
formatsUnordered.Add(new ColorFormatModel(ciexyzFormatName, "XYZ(59, 35, 98)", visibleFormats.ContainsKey(ciexyzFormatName) && visibleFormats[ciexyzFormatName]));
formatsUnordered.Add(new ColorFormatModel(vec4FormatName, "(0.94f, 0.41f, 1.00f, 1f)", visibleFormats.ContainsKey(vec4FormatName) && visibleFormats[vec4FormatName]));
formatsUnordered.Add(new ColorFormatModel(decimalFormatName, "15689983", visibleFormats.ContainsKey(decimalFormatName) && visibleFormats[decimalFormatName]));
formatsUnordered.Add(new ColorFormatModel(hexIntegerFormatName, "0xFFAA00EE", visibleFormats.ContainsKey(hexIntegerFormatName) && visibleFormats[hexIntegerFormatName]));
foreach (var storedColorFormat in _colorPickerSettings.Properties.VisibleColorFormats)
{