Skip to main content

ColorScheme

A set of more than 40 colors based on the Material spec that can be used to configure the color properties of most components. Read more about color schemes in here.

Properties

Events

Properties

errorclass-attributeinstance-attribute

error: Optional[ColorValue] = None

The color to use for input validation errors, e.g. for flet.FormFieldControl.error.

error_containerclass-attributeinstance-attribute

error_container: Optional[ColorValue] = None

A color used for error elements needing less emphasis than error.

inverse_primaryclass-attributeinstance-attribute

inverse_primary: Optional[ColorValue] = None

An accent color used for displaying a highlight color on inverse_surface backgrounds, like button text in a SnackBar.

inverse_surfaceclass-attributeinstance-attribute

inverse_surface: Optional[ColorValue] = None

A surface color used for displaying the reverse of what’s seen in the surrounding UI, for example in a SnackBar to bring attention to an alert.

outlineclass-attributeinstance-attribute

outline: Optional[ColorValue] = None

A utility color that creates boundaries and emphasis to improve usability.

outline_variantclass-attributeinstance-attribute

outline_variant: Optional[ColorValue] = None

A utility color that creates boundaries for decorative elements when a 3:1 contrast isn’t required, such as for dividers or decorative elements.

primaryclass-attributeinstance-attribute

primary: Optional[ColorValue] = None

The color displayed most frequently across your app's screens and components.

primary_containerclass-attributeinstance-attribute

primary_container: Optional[ColorValue] = None

A color used for elements needing less emphasis than primary.

primary_fixedclass-attributeinstance-attribute

primary_fixed: Optional[ColorValue] = None

A substitute for primary_container that's the same color for the dark and light themes.

primary_fixed_dimclass-attributeinstance-attribute

primary_fixed_dim: Optional[ColorValue] = None

A color used for elements needing more emphasis than primary_fixed.

scrimclass-attributeinstance-attribute

scrim: Optional[ColorValue] = None

A color use to paint the scrim around of modal components.

secondaryclass-attributeinstance-attribute

secondary: Optional[ColorValue] = None

An accent color used for less prominent components in the UI, such as filter Chips, while expanding the opportunity for color expression.

secondary_containerclass-attributeinstance-attribute

secondary_container: Optional[ColorValue] = None

A color used for elements needing less emphasis than secondary.

secondary_fixedclass-attributeinstance-attribute

secondary_fixed: Optional[ColorValue] = None

A substitute for secondary_container that's the same color for the dark and light themes.

secondary_fixed_dimclass-attributeinstance-attribute

secondary_fixed_dim: Optional[ColorValue] = None

A color used for elements needing more emphasis than secondary_fixed.

shadowclass-attributeinstance-attribute

shadow: Optional[ColorValue] = None

A color use to paint the drop shadows of elevated components.

surfaceclass-attributeinstance-attribute

surface: Optional[ColorValue] = None

The background color for widgets like Card.

surface_brightclass-attributeinstance-attribute

surface_bright: Optional[ColorValue] = None

A color that's always the lightest in the dark or light theme.

surface_containerclass-attributeinstance-attribute

surface_container: Optional[ColorValue] = None

A recommended color role for a distinct area within the surface.

surface_container_highclass-attributeinstance-attribute

surface_container_high: Optional[ColorValue] = None

A surface container color with a darker tone.

surface_container_highestclass-attributeinstance-attribute

surface_container_highest: Optional[ColorValue] = None

A surface container color with the darkest tone. It is used to create the most emphasis against the surface.

surface_container_lowclass-attributeinstance-attribute

surface_container_low: Optional[ColorValue] = None

A surface container color with a lighter tone that creates less emphasis than surface_container but more emphasis than surface_container_lowest.

surface_container_lowestclass-attributeinstance-attribute

surface_container_lowest: Optional[ColorValue] = None

A surface container color with the lightest tone and the least emphasis relative to the surface.

surface_dimclass-attributeinstance-attribute

surface_dim: Optional[ColorValue] = None

A color that's always darkest in the dark or light theme.

surface_tintclass-attributeinstance-attribute

surface_tint: Optional[ColorValue] = None

A color used as an overlay on a surface color to indicate a component's elevation.

tertiaryclass-attributeinstance-attribute

tertiary: Optional[ColorValue] = None

A color used as a contrasting accent that can balance primary and secondary colors or bring heightened attention to an element, such as an input field.

tertiary_containerclass-attributeinstance-attribute

tertiary_container: Optional[ColorValue] = None

A color used for elements needing less emphasis than tertiary.

tertiary_fixedclass-attributeinstance-attribute

tertiary_fixed: Optional[ColorValue] = None

A substitute for tertiary_container that's the same color for dark and light themes.

tertiary_fixed_dimclass-attributeinstance-attribute

tertiary_fixed_dim: Optional[ColorValue] = None

A color used for elements needing more emphasis than tertiary_fixed.

Events

on_errorclass-attributeinstance-attribute

on_error: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that's clearly legible when drawn on error.

on_error_containerclass-attributeinstance-attribute

on_error_container: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that's clearly legible when drawn on error_container.

on_inverse_surfaceclass-attributeinstance-attribute

on_inverse_surface: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that's clearly legible when drawn on inverse_surface.

on_primaryclass-attributeinstance-attribute

on_primary: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that's clearly legible when drawn on primary.

on_primary_containerclass-attributeinstance-attribute

on_primary_container: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that's clearly legible when drawn on primary_container.

on_primary_fixedclass-attributeinstance-attribute

on_primary_fixed: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that is used for text and icons that exist on top of elements having primary_fixed color.

on_primary_fixed_variantclass-attributeinstance-attribute

on_primary_fixed_variant: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that provides a lower-emphasis option for text and icons than on_primary_fixed.

on_secondaryclass-attributeinstance-attribute

on_secondary: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that's clearly legible when drawn on secondary.

on_secondary_containerclass-attributeinstance-attribute

on_secondary_container: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that's clearly legible when drawn on secondary_container.

on_secondary_fixedclass-attributeinstance-attribute

on_secondary_fixed: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that is used for text and icons that exist on top of elements having secondary_fixed color.

on_secondary_fixed_variantclass-attributeinstance-attribute

on_secondary_fixed_variant: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that provides a lower-emphasis option for text and icons than on_secondary_fixed.

on_surfaceclass-attributeinstance-attribute

on_surface: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that's clearly legible when drawn on surface.

on_surface_variantclass-attributeinstance-attribute

on_surface_variant: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that's clearly legible when drawn on surface_container_highest.

on_tertiaryclass-attributeinstance-attribute

on_tertiary: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that's clearly legible when drawn on tertiary.

on_tertiary_containerclass-attributeinstance-attribute

on_tertiary_container: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that's clearly legible when drawn on tertiary_container.

on_tertiary_fixedclass-attributeinstance-attribute

on_tertiary_fixed: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that is used for text and icons that exist on top of elements having tertiary_fixed color.

on_tertiary_fixed_variantclass-attributeinstance-attribute

on_tertiary_fixed_variant: Optional[ColorValue] = field(default=None, metadata={'event': False})

A color that provides a lower-emphasis option for text and icons than on_tertiary_fixed.