MaterialPicker#
Basic MaterialPicker
Inherits: LayoutControl
Properties
-
color(Optional[ColorValue]) –The currently selected color.
-
enable_label(bool) –Whether to show color shade labels.
-
portrait_only(bool) –Whether to force portrait layout.
Events
-
on_color_change(Optional[ControlEventHandler[MaterialPicker]]) –Called when the picker color is changed.
-
on_primary_change(Optional[ControlEventHandler[MaterialPicker]]) –Called when the primary color is changed.
Example#
Properties#
color
class-attribute
instance-attribute
#
color: Optional[ColorValue] = None
The currently selected color.
enable_label
class-attribute
instance-attribute
#
enable_label: bool = False
Whether to show color shade labels.
portrait_only
class-attribute
instance-attribute
#
portrait_only: bool = False
Whether to force portrait layout.
Events#
on_color_change
class-attribute
instance-attribute
#
on_color_change: Optional[
ControlEventHandler[MaterialPicker]
] = None
Called when the picker color is changed.
The data property of the event handler argument contains
the color value as a hex string.
on_primary_change
class-attribute
instance-attribute
#
on_primary_change: Optional[
ControlEventHandler[MaterialPicker]
] = None
Called when the primary color is changed.
The data property of the event handler argument contains
the color value as a hex string.
