question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created 4 years ago
  • Reactions:9
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mdtaukcommented, Mar 30, 2020

Originally posted in the ColorPicker Orientation Issue, here is a horizontal and vertical mockup for how Swatches could be implemented.

image

This features:

  • the Recent Colours option, which would maintain a list of x number of recently chosen colours;
  • the App Colours option, where the app can choose a set of swatch colours to display;
  • the Windows Colours option, where the Microsoft set of colours (as featured in the Settings App) would be displayed;

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.

1reaction
mdtaukcommented, Nov 28, 2019

Posting this by way of an example of another Fluent based UI kit from Microsoft doing Color Picking and Swatches…

Fabric Web - Color Pickers

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found