Skip to content

MaterialPicker#

A material palette picker for selecting primary and shade colors, with optional shade labels.

MaterialPicker

Basic MaterialPicker

Inherits: LayoutControl

Properties

Events

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.