Skip to content

Proposal: ColorSwatches in ColorPicker #1659

@marcelwgn

Description

@marcelwgn


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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions