Skip to main content

Module theme

Module theme 

Source
Expand description

Color palettes and visual styling for the Map widget.

Theme is a built-in set of named color palettes, each with a light and a dark variant (ColorMode); Theme::colors resolves a (Theme, ColorMode) pair to the actual ThemeColors palette. MapTheme is the customization point: implement it to install your own palette instead of one of the built-ins, the same way NodeTemplate and SegmentTemplate let you replace the built-in node/segment rendering. Style is the non-palette visual configuration (stroke widths, font, background) the widget paints with; it holds no color of its own – every color comes live from the active MapTheme, resolved fresh each frame, so nothing in Style can drift out of sync with the installed theme.

Structs§

Style
Visual style used to paint the map under a given theme.
ThemeColors
A resolved color palette: the actual colors a Theme (or any other MapTheme implementation) uses to paint the map under one ColorMode.

Enums§

ColorMode
Which of a theme’s two color variants to use.
Theme
A built-in, named color palette, in both a light and a dark variant.

Traits§

MapTheme
Customization point for the color palette used to paint the map.