Proposal: ColorSwatches in ColorPicker
See original GitHub issue
Credit: @mdtauk
Proposal: ColorSwatches in ColorPicker
Summary
The win32 ColorPicker has swatches, the WinUI colorpicker should too!
Rationale
- Close gap between win32 and WinUI
- Ability for developers to let users input accent colors easily
- Enables history of colors chosen by user
Scope
Capability | Priority |
---|---|
Close gap between win32 ColorPicker and WinUI ColorPicker | Must |
List of windows accent colors | Must |
Possibility to disable swatches | Must |
Let developer disable list of accent colors | Must |
List of app colors (e.g. list of brand colors) | Must |
Disable list of app colors | Must |
Change text of “App colors” label | Must |
History of colors chosen by user | Should |
Let developer disable list of color history | Should |
Host custom XAML content | Could |
Possible API
enum ColorPickerDisplayMode
{
ColorsOnly, // Would be current mode
Swatches, // Only show swatches
Both // Shows both color swatches and color picker
}
enum ColorSwatchesMode
{
AccentColors, // Windows 10 accent colors
StandardSixteen, // Standard sixteen colors
Custom // Binds to a custom collection of colors
}
class ColorPicker
{
// DisplayMode
ColorPickerDisplayMode DisplayMode;
// SwatchesMode
ColorSwatchesMode SwatchesMode;
// Collection of colors to use when swatches are enabled and swatches is in custom mode
IEnumerable<Color> SwatchesItemsSource;
}
Important Notes
Idea: @mdtauk (this comment)
Open Questions
If we disable everything in the swatches panel, what will we display?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:8 (6 by maintainers)
Top Results From Across the Web
How can I specify certain color swatches for the Color ...
Field Types · Click and drag the hue slider to the right, then select the shade from the canvas. · Enter a hex...
Read more >Setting up your own Color Palette
To access your Color Palette, go to your dashboard, hover over your profile in the top right and click Settings > Branding (Click...
Read more >Color picker drop down should preview color
Choosing a color from the list is currently a rather tedious, cumbersome try-and-error procedure. I propose to display color swatches left to the...
Read more >Customise Color Picker Swatches - ACF Support
Hello all,. I was just wondering if there is a way to customise the 8 swatches that appear at the bottom of the...
Read more >Color picker overview
Learn how to choose colors and create swatches using the color picker.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Originally posted in the ColorPicker Orientation Issue, here is a horizontal and vertical mockup for how Swatches could be implemented.
This features:
Any or all of these options can be turned on or off - no expander/heading would be shown if only one set of swatches is set to be displayed.
Edit: I want to call out the specific styling for the Selected Colour swatch, because by default it would use the AccentColor, but it should use the foreground color of the Light or Dark theme, to help it contrast well with the swatch colour itself.
Posting this by way of an example of another Fluent based UI kit from Microsoft doing Color Picking and Swatches…