mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
Add Ncol, HWB, HSB color format + cleanup
This commit is contained in:
@@ -4,37 +4,10 @@
|
||||
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Enumerations;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
{
|
||||
public enum ColorRepresentationType
|
||||
{
|
||||
/// <summary>
|
||||
/// Color presentation as hexadecimal color value without the alpha-value (e.g. #0055FF)
|
||||
/// </summary>
|
||||
HEX = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as RGB color value (red[0..255], green[0..255], blue[0..255])
|
||||
/// </summary>
|
||||
RGB = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as CMYK color value (cyan[0%..100%], magenta[0%..100%], yellow[0%..100%], black key[0%..100%])
|
||||
/// </summary>
|
||||
CMYK = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as HSL color value (hue[0°..360°], saturation[0..100%], lightness[0%..100%])
|
||||
/// </summary>
|
||||
HSL = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as HSV color value (hue[0°..360°], saturation[0%..100%], value[0%..100%])
|
||||
/// </summary>
|
||||
HSV = 4,
|
||||
}
|
||||
|
||||
public class ColorPickerProperties
|
||||
{
|
||||
public ColorPickerProperties()
|
||||
|
||||
@@ -40,14 +40,10 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
}
|
||||
|
||||
public string GetModuleName()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
=> Name;
|
||||
|
||||
// This can be utilized in the future if the settings.json file is to be modified/deleted.
|
||||
public bool UpgradeSettingsConfiguration()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
=> false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library.Enumerations
|
||||
{
|
||||
public enum ColorRepresentationType
|
||||
{
|
||||
/// <summary>
|
||||
/// Color presentation as hexadecimal color value without the alpha-value (e.g. #0055FF)
|
||||
/// </summary>
|
||||
HEX = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as RGB color value (red[0..255], green[0..255], blue[0..255])
|
||||
/// </summary>
|
||||
RGB = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as CMYK color value (cyan[0%..100%], magenta[0%..100%], yellow[0%..100%], black key[0%..100%])
|
||||
/// </summary>
|
||||
CMYK = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as HSL color value (hue[0°..360°], saturation[0..100%], lightness[0%..100%])
|
||||
/// </summary>
|
||||
HSL = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as HSV color value (hue[0°..360°], saturation[0%..100%], value[0%..100%])
|
||||
/// </summary>
|
||||
HSV = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as HSB color value (hue[0°..360°], saturation[0%..100%], brightness[0%..100%])
|
||||
/// </summary>
|
||||
HSB = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as HSI color value (hue[0°..360°], saturation[0%..100%], value[0%..100%])
|
||||
/// </summary>
|
||||
HSI = 6,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as HWB color value (hue[0°..360°], whiteness[0%..100%], blackness[0%..100%])
|
||||
/// </summary>
|
||||
HWB = 7,
|
||||
|
||||
/// <summary>
|
||||
/// Color presentation as natural color (hue, saturation[0%..100%], value[0%..100%])
|
||||
/// </summary>
|
||||
NCol = 8,
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Text.Json;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Enumerations;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
||||
|
||||
|
||||
@@ -74,6 +74,10 @@
|
||||
<ComboBoxItem Content="CMYK - cmyk(100%, 50%, 75%, 0%)"/>
|
||||
<ComboBoxItem Content="HSL - hsl(100, 50%, 75%)"/>
|
||||
<ComboBoxItem Content="HSV - hsv(100, 50%, 75%)"/>
|
||||
<ComboBoxItem Content="HSB - hsb(100, 50%, 75%)"/>
|
||||
<ComboBoxItem Content="HSI - hsi(100, 50%, 75%)"/>
|
||||
<ComboBoxItem Content="HBW - hbw(100, 50%, 75%)"/>
|
||||
<ComboBoxItem Content="NCob - 10R, 50%, 75%"/>
|
||||
</ComboBox>
|
||||
|
||||
<!--
|
||||
|
||||
Reference in New Issue
Block a user