Overview
Flowery.Uno provides a complete suite of color picker controls that work together to create rich color selection experiences. All controls support HSL and RGB color spaces, automatic theme integration, and accessibility features.
All color picker controls support automatic font scaling when contained within a FloweryScaleManager.EnableScaling="True" container.
Color Picker Controls
DaisyColorWheel
A circular color wheel for selecting hue and saturation values. The wheel displays colors in HSL color space with a draggable marker.
Basic Usage
Properties
Keyboard Navigation
< colorpicker:DaisyColorWheel
x:Name = "ColorWheel"
Width = "200"
Height = "200"
Color = "Red"
Lightness = "0.5"
ColorChanged = "OnColorChanged" />
Property Type Default Description ColorColorRedSelected color (RGB) HslColorHslColor- HSL representation Lightnessdouble0.5Lightness level (0-1) SelectionSizedouble10.0Marker size SelectionOutlineColorColorWhiteMarker outline color ShowCenterLinesboolfalseShow crosshairs ColorStepint4Color step (lower = smoother) OnColorChangedAction<Color>- Callback when color changes
Arrow Keys: Adjust hue (Left/Right) and saturation (Up/Down)
Home/End: Jump to hue 0° / 359°
Page Up/Down: Large saturation adjustments
Enter/Space: Small hue adjustment
How It Works
The wheel renders a bitmap where:
Angle = Hue (0-359°)
Distance from center = Saturation (0-1)
Lightness is fixed at the Lightness property value
Drag the marker to select a color, or use keyboard navigation for precise control.
Example: Linked Lightness Slider
< StackPanel Spacing = "12" >
< colorpicker:DaisyColorWheel
x:Name = "ColorWheel"
Width = "200"
Height = "200"
Lightness = "{x:Bind LightnessSlider.Value, Mode=OneWay}" />
< colorpicker:DaisyColorSlider
x:Name = "LightnessSlider"
Channel = "Lightness"
Color = "{x:Bind ColorWheel.Color, Mode=TwoWay}"
Height = "20" />
</ StackPanel >
DaisyColorGrid
A grid control for displaying and selecting colors from a palette. Supports custom color collections and auto-add functionality.
Basic Usage
Properties
Palettes
< colorpicker:DaisyColorGrid
x:Name = "ColorGrid"
Palette = "Paint"
ShowCustomColors = "True"
AutoAddColors = "True"
ColorChanged = "OnColorChanged" />
Property Type Default Description ColorColorBlackSelected color ColorIndexint-1Index of selected color PaletteColorCollectionPaintColor collection to display CustomColorsColorCollection16 slots Custom colors collection ShowCustomColorsbooltrueShow custom colors section CellSizeSize16×16Size of each cell SpacingSize3×3Spacing between cells Columnsint16Number of columns CellBorderColorColorGray Cell border color SelectionBorderColorColorBlue Selection border color AutoAddColorsbooltrueAuto-add selected colors to custom
Built-in palettes:
ColorCollection.Paint - Standard paint palette
ColorCollection.Web - Web-safe colors
ColorCollection.CreateCustom(n) - Empty custom palette with n slots
Example: Custom Palette
var myPalette = new ColorCollection ();
myPalette . Add ( Colors . Red );
myPalette . Add ( Colors . Green );
myPalette . Add ( Colors . Blue );
ColorGrid . Palette = myPalette ;
Keyboard Navigation
Arrow Keys: Navigate cells
Home/End: Jump to first/last color
Enter/Space: Select current cell
DaisyColorSlider
A slider control for selecting individual color channel values (RGB, HSL, Alpha).
RGB Sliders
HSL Sliders
Properties
< StackPanel Spacing = "6" >
< colorpicker:DaisyColorSlider
Channel = "Red"
Color = "{x:Bind MyColor, Mode=TwoWay}"
Height = "18" />
< colorpicker:DaisyColorSlider
Channel = "Green"
Color = "{x:Bind MyColor, Mode=TwoWay}"
Height = "18" />
< colorpicker:DaisyColorSlider
Channel = "Blue"
Color = "{x:Bind MyColor, Mode=TwoWay}"
Height = "18" />
< colorpicker:DaisyColorSlider
Channel = "Alpha"
Color = "{x:Bind MyColor, Mode=TwoWay}"
Height = "18"
ShowCheckerboard = "True" />
</ StackPanel >
< StackPanel Spacing = "6" >
< colorpicker:DaisyColorSlider
Channel = "Hue"
Color = "{x:Bind MyColor, Mode=TwoWay}"
Height = "18" />
< colorpicker:DaisyColorSlider
Channel = "Saturation"
Color = "{x:Bind MyColor, Mode=TwoWay}"
Height = "18" />
< colorpicker:DaisyColorSlider
Channel = "Lightness"
Color = "{x:Bind MyColor, Mode=TwoWay}"
Height = "18" />
</ StackPanel >
Property Type Default Description ChannelColorSliderChannelHueChannel to control ColorColorRedCurrent color OrientationOrientationHorizontalSlider orientation NubSizedouble8.0Thumb/nub size ShowCheckerboardbooltrueShow checkerboard for alpha MinimumdoubleAuto Minimum value MaximumdoubleAuto Maximum value Valuedouble0Current channel value
Channel Types
public enum ColorSliderChannel
{
Red , // 0-255
Green , // 0-255
Blue , // 0-255
Alpha , // 0-255
Hue , // 0-359
Saturation , // 0-100
Lightness // 0-100
}
Vertical Orientation
< colorpicker:DaisyColorSlider
Channel = "Hue"
Orientation = "Vertical"
Width = "20"
Height = "200" />
DaisyColorEditor
A comprehensive color editor with RGB/HSL sliders and numeric inputs. This is the most feature-complete picker control.
Full Editor
RGB Only
Properties
< colorpicker:DaisyColorEditor
x:Name = "ColorEditor"
Color = "{x:Bind ViewModel.SelectedColor, Mode=TwoWay}"
ShowHexInput = "True"
ShowRgbSliders = "True"
ShowHslSliders = "True"
ShowAlphaChannel = "True" />
< colorpicker:DaisyColorEditor
Color = "{x:Bind MyColor, Mode=TwoWay}"
ShowHslSliders = "False"
ShowHexInput = "False" />
Property Type Default Description ColorColorRedSelected color HslColorHslColor- HSL representation EditingModeColorEditingModeRgbEditing mode ShowAlphaChannelbooltrueShow alpha controls ShowHexInputbooltrueShow hex input field ShowRgbSlidersbooltrueShow RGB sliders ShowHslSlidersbooltrueShow HSL sliders Redbyte255Red component (0-255) Greenbyte0Green component (0-255) Bluebyte0Blue component (0-255) Alphabyte255Alpha component (0-255) Huedouble0Hue component (0-359) Saturationdouble100Saturation (0-100) Lightnessdouble50Lightness (0-100) HexValuestring- Hex color string
Features
Dual mode: RGB and HSL sliders with synchronized updates
Hex input: Supports 6-digit (#RRGGBB) and 8-digit (#AARRGGBB) formats
Numeric inputs: DaisyNumericUpDown for precise value entry
Auto-sync: All controls automatically sync when any value changes
Example: Compact Color Editor
< Border BorderBrush = "{ThemeResource DaisyBase300Brush}"
BorderThickness = "1"
Padding = "8" >
< colorpicker:DaisyColorEditor
Color = "{x:Bind MyColor, Mode=TwoWay}"
ShowHexInput = "True"
ShowRgbSliders = "True"
ShowHslSliders = "False"
ShowAlphaChannel = "False" />
</ Border >
DaisyScreenColorPicker
A control for picking colors from anywhere on the screen using an eyedropper tool (Windows only).
DaisyScreenColorPicker uses Win32 APIs and only works on Windows. On other platforms, it displays but does not capture screen colors.
Basic Usage
Properties
Events
< colorpicker:DaisyScreenColorPicker
x:Name = "ScreenPicker"
Color = "{x:Bind ViewModel.PickedColor, Mode=TwoWay}"
PickingCompleted = "OnPickingCompleted" />
Property Type Default Description ColorColorBlackSelected color IsCapturingboolfalseWhether currently capturing OnColorChangedAction<Color>- Callback when color changes
public event EventHandler < ColorChangedEventArgs >? ColorChanged ;
public event EventHandler ? PickingCompleted ;
public event EventHandler ? PickingCancelled ;
How to Use
Click and hold
Click on the screen picker control and hold the mouse button.
Drag anywhere
Drag the cursor anywhere on the screen. The preview updates in real-time.
Release to pick
Release the mouse button to pick the color under the cursor.
Escape to cancel
Press Escape to cancel the pick operation.
Display
The control shows:
Color preview with checkerboard background for transparency
Hex value (#RRGGBB)
RGB values (R:nnn G:nnn B:nnn)
Status text (“Click and drag to pick” / “Release to pick”)
Eyedropper icon (hidden while capturing)
HSL Color Space
All color picker controls support HSL (Hue, Saturation, Lightness) color space alongside RGB.
HslColor Struct
public struct HslColor
{
public int A { get ; set ; } // Alpha (0-255)
public double H { get ; set ; } // Hue (0-359)
public double S { get ; set ; } // Saturation (0-1)
public double L { get ; set ; } // Lightness (0-1)
// Constructors
public HslColor ( double hue , double saturation , double lightness );
public HslColor ( int alpha , double hue , double saturation , double lightness );
public HslColor ( Color color );
// Conversion
public Color ToRgbColor ();
public Color ToRgbColor ( int alpha );
}
HSL ↔ RGB Conversion
// RGB to HSL
var rgbColor = Colors . Red ;
var hslColor = new HslColor ( rgbColor );
Console . WriteLine ( $"H= { hslColor . H } , S= { hslColor . S } , L= { hslColor . L } " );
// HSL to RGB
var hsl = new HslColor ( 120 , 1.0 , 0.5 ); // Green
var rgb = hsl . ToRgbColor ();
// Implicit conversion
Color color = new HslColor ( 240 , 1.0 , 0.5 ); // Blue
HslColor hsl2 = Colors . Yellow ;
Integration Patterns
Complete Color Picker Dialog
Combine multiple controls for a comprehensive color picker:
< StackPanel Spacing = "12" Padding = "12" >
<!-- Wheel + Lightness -->
< Grid ColumnSpacing = "12" >
< Grid.ColumnDefinitions >
< ColumnDefinition Width = "Auto" />
< ColumnDefinition Width = "*" />
</ Grid.ColumnDefinitions >
< colorpicker:DaisyColorWheel
x:Name = "ColorWheel"
Grid.Column = "0"
Width = "200"
Height = "200"
Lightness = "{x:Bind LightnessSlider.Value, Mode=OneWay}"
Color = "{x:Bind SelectedColor, Mode=TwoWay}" />
< colorpicker:DaisyColorSlider
x:Name = "LightnessSlider"
Grid.Column = "1"
Channel = "Lightness"
Orientation = "Vertical"
Width = "20"
Height = "200"
Color = "{x:Bind SelectedColor, Mode=TwoWay}" />
</ Grid >
<!-- Editor -->
< colorpicker:DaisyColorEditor
Color = "{x:Bind SelectedColor, Mode=TwoWay}" />
<!-- Palette -->
< colorpicker:DaisyColorGrid
Color = "{x:Bind SelectedColor, Mode=TwoWay}"
Height = "120" />
<!-- Screen Picker -->
< colorpicker:DaisyScreenColorPicker
Color = "{x:Bind SelectedColor, Mode=TwoWay}" />
</ StackPanel >
Theme-Based Color Picker
Bind to DaisyUI theme colors:
< StackPanel Spacing = "8" >
< TextBlock Text = "Select Theme Color" />
< colorpicker:DaisyColorGrid
ColorChanged = "OnThemeColorChanged" >
< colorpicker:DaisyColorGrid.Palette >
< colorpicker:ColorCollection >
< Color > {ThemeResource DaisyPrimaryColor} </ Color >
< Color > {ThemeResource DaisySecondaryColor} </ Color >
< Color > {ThemeResource DaisyAccentColor} </ Color >
< Color > {ThemeResource DaisyInfoColor} </ Color >
< Color > {ThemeResource DaisySuccessColor} </ Color >
< Color > {ThemeResource DaisyWarningColor} </ Color >
< Color > {ThemeResource DaisyErrorColor} </ Color >
</ colorpicker:ColorCollection >
</ colorpicker:DaisyColorGrid.Palette >
</ colorpicker:DaisyColorGrid >
</ StackPanel >
Custom Color with Callback
< colorpicker:DaisyColorWheel
Width = "200"
Height = "200"
OnColorChanged = "{x:Bind UpdateBackgroundColor}" />
private void UpdateBackgroundColor ( Color color )
{
MyPanel . Background = new SolidColorBrush ( color );
}
Accessibility
All color picker controls support:
Keyboard navigation with arrow keys, Home/End, Page Up/Down
Focus visuals using UseSystemFocusVisuals="True"
Screen reader support via AutomationProperties.Name
Custom accessible text via AccessibleText property
< colorpicker:DaisyColorWheel
AccessibleText = "Background color picker"
IsTabStop = "True"
UseSystemFocusVisuals = "True" />
Best Practices
Use HSL for hue-based adjustments
HSL is ideal for color manipulation (brightness, saturation adjustments) while RGB is better for precise channel control.
Combine controls for rich experiences
Pair DaisyColorWheel with sliders for the most intuitive color selection.
Provide alpha channel when needed
Set ShowAlphaChannel="True" on DaisyColorEditor and use DaisyColorSlider with Channel="Alpha" for transparency support.
Use ColorCollection for presets
Provide users with common color presets using DaisyColorGrid with a custom palette.
Sync multiple controls with two-way binding
Bind all controls to the same Color property with Mode=TwoWay for automatic synchronization.