{"id":14965190,"url":"https://github.com/pixieditor/colorpicker","last_synced_at":"2025-05-16T12:11:57.848Z","repository":{"id":40689672,"uuid":"276699534","full_name":"PixiEditor/ColorPicker","owner":"PixiEditor","description":"Customizable Color Picker control for WPF and AvaloniaUI","archived":false,"fork":false,"pushed_at":"2025-04-17T09:56:08.000Z","size":1459,"stargazers_count":282,"open_issues_count":14,"forks_count":31,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-18T00:23:33.048Z","etag":null,"topics":["avaloniaui","color-picker","colors","control","dotnet","graphics","hsl","hsv","nuget","rgb","wpf","wpf-color-picker","xaml"],"latest_commit_sha":null,"homepage":"https://pixieditor.net/colorpicker","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PixiEditor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-02T16:48:20.000Z","updated_at":"2025-04-16T06:59:55.000Z","dependencies_parsed_at":"2023-09-24T13:10:07.971Z","dependency_job_id":"a887ad49-dd9e-4531-99bb-c3b13ec7ea8e","html_url":"https://github.com/PixiEditor/ColorPicker","commit_stats":{"total_commits":179,"total_committers":5,"mean_commits":35.8,"dds":"0.36312849162011174","last_synced_commit":"e707f2576d2a08600edbecee9d2aa6e3af2fafd2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixiEditor%2FColorPicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixiEditor%2FColorPicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixiEditor%2FColorPicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixiEditor%2FColorPicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PixiEditor","download_url":"https://codeload.github.com/PixiEditor/ColorPicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254527099,"owners_count":22085919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avaloniaui","color-picker","colors","control","dotnet","graphics","hsl","hsv","nuget","rgb","wpf","wpf-color-picker","xaml"],"created_at":"2024-09-24T13:34:20.838Z","updated_at":"2025-05-16T12:11:57.789Z","avatar_url":"https://github.com/PixiEditor.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Discord Server](https://badgen.net/badge/discord/join%20chat/7289DA?icon=discord)](https://discord.gg/qSRMYmq)\n[![Download](https://img.shields.io/badge/nuget-download-blue)](https://www.nuget.org/packages/PixiEditor.ColorPicker/)\n[![Downloads](https://img.shields.io/nuget/dt/PixiEditor.ColorPicker)](https://www.nuget.org/packages/PixiEditor.ColorPicker/)\n\n# About\n\nA collection of various WPF and AvaloniaUI controls used to select colors.\nSupports .NET Framework 4.5.1+, .NET Core 3.1+, .NET 5 - 7 (WPF) and .NET 6 - 8 (AvaloniaUI).\nOriginally developed for [PixiEditor](https://github.com/PixiEditor/PixiEditor).\n\n![screenshot](https://i.imgur.com/4ysN4Fe.png)\n\n# Included Controls\n\n- `SquarePicker`: A HSV/HSL Color Picker, consists of a circular hue slider and HV/HL square.\n- `ColorSliders`: A set of HSV/RGB + Alpha sliders\n- `HexColorTextBox`: An RGBA Hex text field\n- `ColorDisplay`: A Primary/Secondary Color display with a swap button\n- `StandardColorPicker`: Combines everything listed above in one control\n- `PortableColorPicker`: A collapsible version of StandardColorPicker\n- `AlphaSlider`: A separate alpha slider control\n\n![demo project](https://i.imgur.com/wZkkykY.png)\n\n# Example Usage\n\nSee [ColorPickerDemo](https://github.com/PixiEditor/ColorPicker/tree/master/ColorPickerDemo) for an example project.\n\n**Basic usage:**\n\n- [WPF Basic Usage](https://github.com/PixiEditor/ColorPicker/tree/master/src/ColorPicker/README.md#example-usage)\n- [AvaloniaUI Basic Usage](https://github.com/PixiEditor/ColorPicker/tree/master/src/ColorPicker.AvaloniaUI/README.md#example-usage)\n\n# Properties\n\nAll controls share these properties:\n\n- `SelectedColor` dependency property stores the current color as `System.Windows.Media.Color` or `Avalonia.Media.Color`. **Use this one if you simply want to get (or bind to) the current color.** When connecting controls together with bindings, use the `ColorState` dependency property instead.\n- `ColorChanged`: An event that fires on SelectedColor change.\n- `Color` property contains nested properties you may bind to or use to retrieve the color in code-behind:\n  - `Color.A`: Current Alpha, a double ranging from 0 to 255\n  - `Color.RGB_R`, `Color.RGB_G`, `Color.RGB_B`: Dimensions of the RGB color space, each is a 0-255 double\n  - `Color.HSV_H`: Hue in the HSV color space, a 0-360 double\n  - `Color.HSV_S`: Saturation in the HSV color space, a 0-100 double\n  - `Color.HSV_V`: Value in the HSV color space, a 0-100 double\n  - `Color.HSL_H`: Hue in the HSL color space, a 0-360 double\n  - `Color.HSL_S`: Saturation in the HSL color space, a 0-100 double\n  - `Color.HSL_L`: Lightness in the HSL color space, a 0-100 double\n- `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.**\n\nApart from those, some controls have unique properties:\n\n- `SecondColorState`, `SecondColor`, and `SecondaryColor` are functionally identical to `ColorState`, `Color`, and `SelectedColor` respectively. These are present on controls that have a secondary color.\n- `HintColorState`, `HintNotifyableColor`, and `HintColor` are functionally identical to `ColorState`, `Color`, and `SelectedColor` 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.\n- `UseHintColor` enables the hint color or disables it (disabled by default).\n- `SmallChange` lets you change `SmallChange` 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.\n- `ShowAlpha` lets you hide the alpha channel on various controls. Present on all controls containing either an alpha slider or a hex color textbox.\n- `ShowFractionalPart` lets you hide the digits after the \".\" in the textboxes showing HSV and HSL values. Present on `ColorSliders` and on other controls containing `ColorSliders`.\n- `PickerType`: HSV or HSL, present on `SquarePicker` and on controls that contain `SquarePicker`.\n- `HexRepresentation`: RGBA or ARGB, present on `HexColorTextBox` and on controls that contain `HexColorTextBox`.\n\n# Styling\n\nStyling differs between AvaloniaUI and WPF version. See the respective READMEs for more info.\n\n## AvaloniaUI\n\nSee [AvaloniaUI Styling](https://github.com/PixiEditor/ColorPicker/tree/master/src/ColorPicker.AvaloniaUI/README.md#styling)\n\n## WPF\n\nSee [WPF Styling](https://github.com/PixiEditor/ColorPicker/tree/master/src/ColorPicker/README.md#styling)\n\n# Other\n\nRead flabbet's article on the theory behind the first version of this project\non [dev.to](https://dev.to/flabbet/how-does-color-pickers-work-1275)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixieditor%2Fcolorpicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixieditor%2Fcolorpicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixieditor%2Fcolorpicker/lists"}