Skip to content

SlidePicker#

A slider-based color picker that exposes RGB/HSV/HSL channels with optional labels and indicators.

SlidePicker

Basic SlidePicker

Inherits: LayoutControl

Properties

Events

Example#


Properties#

color class-attribute instance-attribute #

color: Optional[ColorValue] = None

The currently selected color.

color_model class-attribute instance-attribute #

color_model: Optional[ColorModel] = None

The color model used by the sliders.

display_thumb_color class-attribute instance-attribute #

display_thumb_color: bool = True

Whether to display the thumb color in sliders.

enable_alpha class-attribute instance-attribute #

enable_alpha: bool = True

Whether to enable alpha (opacity) slider.

indicator_alignment_begin class-attribute instance-attribute #

indicator_alignment_begin: Optional[Alignment] = None

Alignment for the indicator split begin.

indicator_alignment_end class-attribute instance-attribute #

indicator_alignment_end: Optional[Alignment] = None

Alignment for the indicator split end.

indicator_border_radius class-attribute instance-attribute #

indicator_border_radius: Optional[BorderRadiusValue] = None

Border radius for the indicator.

indicator_size class-attribute instance-attribute #

indicator_size: Optional[Size] = None

Size of the indicator.

label_text_style class-attribute instance-attribute #

label_text_style: Optional[TextStyle] = None

Text style for labels.

label_types class-attribute instance-attribute #

label_types: Optional[list[ColorLabelType]] = None

Color label types to display.

show_indicator class-attribute instance-attribute #

show_indicator: bool = True

Whether to show the color indicator.

show_label class-attribute instance-attribute #

show_label: bool = True

Whether to show labels.

show_params class-attribute instance-attribute #

show_params: bool = True

Whether to show parameter values.

show_slider_text class-attribute instance-attribute #

show_slider_text: bool = True

Whether to show slider text.

slider_size class-attribute instance-attribute #

slider_size: Optional[Size] = None

Size of the sliders.

slider_text_style class-attribute instance-attribute #

slider_text_style: Optional[TextStyle] = None

Text style for slider text.

Events#

on_color_change class-attribute instance-attribute #

on_color_change: Optional[
    ControlEventHandler[SlidePicker]
] = None

Called when the picker color is changed.

The data property of the event handler argument contains the color value as a hex string.