
īy default, the color picker shows a preview of the chosen color on the rectangular bar beside the color spectrum.
#COLORPICKER .NET HOW TO#
This example shows how to create a default color picker in XAML. Get the app from the Microsoft Store or get the source code on GitHub The WinUI 3 Gallery app includes interactive examples of most WinUI 3 controls, features, and functionality.

Open the WinUI 3 Gallery app and see the ColorPicker in action. Or, commit the selection upon dismissing the flyout, by either tapping outside of the flyout or hitting the back button.Hitting the back button or tapping outside of the flyout will dismiss it, and not save the user's selection. Provide commit and cancel buttons to apply or cancel the selection.When used in a flyout, tapping in the spectrum or adjusting the slider alone should not commit the color selection.For the most accurate color picking experience, use the square spectrum and ensure it is at least 256x256px, or include the text input fields to let users refine their selected color.Some scenarios may not require granular color picking and would benefit from a simplified picker Think about what kind of color picking experience is appropriate for your app.


If your app is for drawing or similar tasks using pen, consider using Inking controls along with the color picker. For example, use it to change color settings, such as font colors, background, or app theme colors. Use the color picker to let a user select colors in your app. By default, it lets a user navigate through colors on a color spectrum, or specify a color in either Red-Green-Blue (RGB), Hue-Saturation-Value (HSV), or Hexadecimal text boxes. A color picker is used to browse through and select colors.
