material_design
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]
MDPalette(name='', color_depth=16, swapped=False, color_map=COLORS)
Bases: MappedPalette
Material Design swatch palette.
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 the S500 primary shade.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
Label for :attr: |
''
|
|
color_depth
|
Output format; see :class: |
16
|
|
swapped
|
Byte-swap 16-bit colors when |
False
|
|
color_map
|
RGB byte map; defaults to the built-in Material Design table. |
COLORS
|