Extensible and compact color selector implemented in C# with WPF. Features highly-customizable default ControlTemplate and interactive 3D color models. Works as both standalone (with test application) and as an imported Control. Protoyped with Adobe XD and tested with NUnit unit testing framework.
- .JSON file import and export support for loading and saving colors
- Drag-and-drop support for loading .JSON files when drag-dropping over the Presets and Custom color selectors
- Dynamic application scale controls, allowing the user to increase the scale of the entire interface if needed.
- Versatile color selector with modern user interface (UI) and emphasis on user experience (UX)
- 3D interactive RGB cube and HSV cone color models with click-drag and mouse-wheel support for edit actions
- Menu with options to control visibility of individual color editor components
- Clipboard paste support for hexadecimal color strings - paste directly into the Control at any location
- Ability to define a custom set of preset colors and save custom colors at runtime
- Supports RGB, HSL, and HSV color modes, with hexadecimal RGBA string support
- Error-checking for input fields with validation feedback
- Minimal code footprint (two main files - ColorSelector.cs and Themes/Generic.xaml, with organized supporting files)
- Easy to import as a control library into other WPF projects
- Completely customizable, based on ControlTemplates
- Functions well in nearly any window size, from narrow-wdith window to full-screen
For a more detailed explanation of the code, a blog post about the project is available here.
The repository consists of three Visual Studio projects - the ColorSelector project, a companion standalone application project, and an NUnit unit testing project. Opening the ColorSelector/ColorSelector.sln file in Visual Studio should allow all projects to be built and run. To use the ColorSelector as a Control in another WPF application, add the ColorSelector project to the parent solution in Visual Studio, then add a project reference to the ColorSelector project for any projects that will use the ColorSelector.
- Menu settings for number of presets and custom colors
- Configuration settings support