create_theme, then attach it per page or document wide.
Creating a theme
definition holds a colors map of named colors, along with other optional
fields.
Applying a theme
Apply a theme document wide withset_theme, or pass it to a single page through
create_page.
Reading colors
theme.get_color returns a registered color by name. Use it anywhere a color is accepted.
Related pages
Elements
Apply theme colors to text, rectangles, and images.
Overview
The Document and Page classes and the build pipeline.