PixiEditor.ColorPicker
3.4.2
Prefix Reserved
dotnet add package PixiEditor.ColorPicker --version 3.4.2
NuGet\Install-Package PixiEditor.ColorPicker -Version 3.4.2
<PackageReference Include="PixiEditor.ColorPicker" Version="3.4.2" />
<PackageVersion Include="PixiEditor.ColorPicker" Version="3.4.2" />
<PackageReference Include="PixiEditor.ColorPicker" />
paket add PixiEditor.ColorPicker --version 3.4.2
#r "nuget: PixiEditor.ColorPicker, 3.4.2"
#addin nuget:?package=PixiEditor.ColorPicker&version=3.4.2
#tool nuget:?package=PixiEditor.ColorPicker&version=3.4.2
About
A collection of various WPF and AvaloniaUI controls used to select colors. Supports .NET Framework 4.5.1+, .NET Core 3.1+, .NET 5 - 7 (WPF) and .NET 6 - 8 (AvaloniaUI). Originally developed for PixiEditor.
Included Controls
SquarePicker
: A HSV/HSL Color Picker, consists of a circular hue slider and HV/HL square.ColorSliders
: A set of HSV/RGB + Alpha slidersHexColorTextBox
: An RGBA Hex text fieldColorDisplay
: A Primary/Secondary Color display with a swap buttonStandardColorPicker
: Combines everything listed above in one controlPortableColorPicker
: A collapsible version of StandardColorPickerAlphaSlider
: A separate alpha slider control
Example Usage
See ColorPickerDemo for an example project.
Basic usage:
Properties
All controls share these properties:
SelectedColor
dependency property stores the current color asSystem.Windows.Media.Color
orAvalonia.Media.Color
. Use this one if you simply want to get (or bind to) the current color. When connecting controls together with bindings, use theColorState
dependency property instead.ColorChanged
: An event that fires on SelectedColor change.Color
property contains nested properties you may bind to or use to retrieve the color in code-behind:Color.A
: Current Alpha, a double ranging from 0 to 255Color.RGB_R
,Color.RGB_G
,Color.RGB_B
: Dimensions of the RGB color space, each is a 0-255 doubleColor.HSV_H
: Hue in the HSV color space, a 0-360 doubleColor.HSV_S
: Saturation in the HSV color space, a 0-100 doubleColor.HSV_V
: Value in the HSV color space, a 0-100 doubleColor.HSL_H
: Hue in the HSL color space, a 0-360 doubleColor.HSL_S
: Saturation in the HSL color space, a 0-100 doubleColor.HSL_L
: Lightness in the HSL color space, a 0-100 double
ColorState
dependency property contains all info about the current state of the control. Use this property to bind controls together. Do not use it for any other purpose, use the other properties listed above.
Apart from those, some controls have unique properties:
SecondColorState
,SecondColor
, andSecondaryColor
are functionally identical toColorState
,Color
, andSelectedColor
respectively. These are present on controls that have a secondary color.HintColorState
,HintNotifyableColor
, andHintColor
are functionally identical toColorState
,Color
, andSelectedColor
respectively. These are present on controls that have a hint color. The hint color is a color field that can be used to obtain the primary color from an external source when the user clicks a button.UseHintColor
enables the hint color or disables it (disabled by default).SmallChange
lets you changeSmallChange
of sliders, which is used as sensitivity for when the user turns the scroll wheel with the cursor over the sliders. Present on controls with sliders.ShowAlpha
lets you hide the alpha channel on various controls. Present on all controls containing either an alpha slider or a hex color textbox.ShowFractionalPart
lets you hide the digits after the "." in the textboxes showing HSV and HSL values. Present onColorSliders
and on other controls containingColorSliders
.PickerType
: HSV or HSL, present onSquarePicker
and on controls that containSquarePicker
.HexRepresentation
: RGBA or ARGB, present onHexColorTextBox
and on controls that containHexColorTextBox
.
Styling
Styling differs between AvaloniaUI and WPF version. See the respective READMEs for more info.
AvaloniaUI
WPF
See WPF Styling
Other
Read flabbet's article on the theory behind the first version of this project on dev.to
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net5.0-windows7.0 is compatible. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net6.0-windows7.0 is compatible. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net7.0-windows7.0 is compatible. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
.NET Framework | net451 is compatible. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETCoreApp 3.1
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.31)
- PixiEditor.ColorPicker.Models (>= 1.0.7)
-
.NETFramework 4.5.1
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.31)
- PixiEditor.ColorPicker.Models (>= 1.0.7)
-
net5.0-windows7.0
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.31)
- PixiEditor.ColorPicker.Models (>= 1.0.7)
-
net6.0-windows7.0
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.31)
- PixiEditor.ColorPicker.Models (>= 1.0.7)
-
net7.0-windows7.0
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.31)
- PixiEditor.ColorPicker.Models (>= 1.0.7)
-
net8.0-windows7.0
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.31)
- PixiEditor.ColorPicker.Models (>= 1.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (8)
Showing the top 8 popular GitHub repositories that depend on PixiEditor.ColorPicker:
Repository | Stars |
---|---|
BartoszCichecki/LenovoLegionToolkit
Lightweight Lenovo Vantage and Hotkeys replacement for Lenovo Legion laptops.
|
|
Valkirie/HandheldCompanion
ControllerService
|
|
WolvenKit/WolvenKit
Community Mod editor/creator for REDengine games.
|
|
Hofknecht/SystemTrayMenu
SystemTrayMenu - Browse and open your files easily
|
|
C1rdec/Poe-Lurker
Ease your trading experience in Path of Exile.
|
|
vchelaru/FlatRedBall
Cross-platform 2D game engine focused on ultimate productivity built in .NET
|
|
vchelaru/Gum
Flexible layout tool for creating UI on any platform
|
|
JeffersonQin/YuzuMarker
🍋 [WIP] Manga Translation Tool
|