SlidePicker#
Basic SlidePicker
Inherits: LayoutControl
Properties
-
color(Optional[ColorValue]) –The currently selected color.
-
color_model(Optional[ColorModel]) –The color model used by the sliders.
-
display_thumb_color(bool) –Whether to display the thumb color in sliders.
-
enable_alpha(bool) –Whether to enable alpha (opacity) slider.
-
indicator_alignment_begin(Optional[Alignment]) –Alignment for the indicator split begin.
-
indicator_alignment_end(Optional[Alignment]) –Alignment for the indicator split end.
-
indicator_border_radius(Optional[BorderRadiusValue]) –Border radius for the indicator.
-
indicator_size(Optional[Size]) –Size of the indicator.
-
label_text_style(Optional[TextStyle]) –Text style for labels.
-
label_types(Optional[list[ColorLabelType]]) –Color label types to display.
-
show_indicator(bool) –Whether to show the color indicator.
-
show_label(bool) –Whether to show labels.
-
show_params(bool) –Whether to show parameter values.
-
show_slider_text(bool) –Whether to show slider text.
-
slider_size(Optional[Size]) –Size of the sliders.
-
slider_text_style(Optional[TextStyle]) –Text style for slider text.
Events
-
on_color_change(Optional[ControlEventHandler[SlidePicker]]) –Called when the picker color is changed.
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
#
Alignment for the indicator split begin.
indicator_alignment_end
class-attribute
instance-attribute
#
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
#
Size of the indicator.
label_text_style
class-attribute
instance-attribute
#
Text style for labels.
label_types
class-attribute
instance-attribute
#
Color label types to display.
show_indicator
class-attribute
instance-attribute
#
show_indicator: bool = True
Whether to show the color indicator.
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
#
Size of the sliders.
slider_text_style
class-attribute
instance-attribute
#
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.
