palettes.material_design
Material Design color palette.
256 swatches from the Material Design spec, exposed as indexed colors and
named attributes. Each hue family includes shades S50–S900; most
families also provide accent colors A100, A200, A400, and
A700.
Example
>>> from palettes import get_palette
>>> palette = get_palette(name="material_design", color_depth=16)
>>> palette.RED
>>> palette.RED_S900
>>> palette[127]
- class palettes.material_design.MDPalette(name='', color_depth=16, swapped=False, color_map=<memory>)[source]
Bases:
MappedPaletteMaterial Design swatch palette.
This palette is a good fit for UI theming and semantic color choices such as surfaces, accents, success/error states, and status chips. The generated named attributes make it easy to pick an icon, badge, or button color that matches the Material Design system without manually looking up hex values.
Colors are stored in a flat RGB map. During initialization, named attributes are created for each family and shade (for example
RED,RED_S500,RED_A700). The unsuffixed name always refers to theS500primary shade.