Skip to main content

material-color-palette

Google's original 2014 Material Design color palettes as a Python library package.

Image showing all shades of all colors. Image showing all shades of all colors. Generated with extras/palette_image.py

Original source (scroll down to 2014 Material Design color palettes and expand).

Because I wanted to use the palette in my projects, but didn't want to copy-paste values, and couldn't find an existing implementation that was simple and complete.

No external dependencies; fully type-hinted and with a test suite.

Installation

Install from PyPI, e.g.:

pip install material-color-palette

Usage

>>> from material_color_palette import Color
>>> MY_COLOR = Color("red", 700)
>>> MY_COLOR
Color(name='red', shade=700, rgb=(211, 47, 47))

# Use RGB triplet representation in e.g. pygame/pygame-ce:
>>> MY_COLOR.rgb
(211, 47, 47)

# Use hex string representation in e.g. Matplotlib:
>>> MY_COLOR.hex
'#d32f2f'

# r, g, b properties should cover any other need:
>>> f"r={MY_COLOR.r / 255}, g={MY_COLOR.g / 255}, b={MY_COLOR.b / 255}, a=1.0"
'r=0.8274509803921568, g=0.1843137254901961, b=0.1843137254901961, a=1.0'

# Accent colours use the original notation, so shade value is a string  
>>> Color("pink", "a100")

# You can use strings for non-accented colours too, if you want to be consistent
>>> Color("teal", "100")

# Useful, contextual error messages:
>>> Color("lime_green")
Traceback (most recent call last):
...
ValueError: 'lime_green' isn't a valid Material color name. Allowed values: 'amber',
'black', 'blue', 'blue gray', 'blue_gray', 'brown', 'cyan', 'deep orange', 'deep purple',
'deep_orange', 'deep_purple', 'gray', 'green', 'indigo', 'light blue', 'light green',
'light_blue', 'light_green', 'lime', 'orange', 'pink', 'purple', 'red', 'teal', 'white',
'yellow'.

>>> Color("lime")
Traceback (most recent call last):
...
ValueError: Shade must be specified for Material color 'lime'.

>>> Color("yellow", 950)
Traceback (most recent call last):
...
ValueError: 950 isn't a valid shade for Material color 'yellow'. Allowed values: 50,
100, 200, 300, 400, 500, 600, 700, 800, 900, 'a100', 'a200', 'a400', 'a700'.


>>> Color("gray", "a200")
Traceback (most recent call last):
...
ValueError: 'a200' isn't a valid shade for Material color 'gray'. Allowed values: 50,
100, 200, 300, 400, 500, 600, 700, 800, 900.

Metadata

Release files for material-color-palette 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for material-color-palette 1.3.0
File Size Uploaded Provenance Actions
material_color_palette-1.3.0.tar.gz 122.9 kB With provenance Details for material_color_palette-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for material-color-palette 1.3.0
File Interpreter ABI Platform Actions
material_color_palette-1.3.0-py3-none-any.whl Python 3 none any Details for material_color_palette-1.3.0-py3-none-any.whl

Total release size: 130.0 kB

Release files / material_color_palette-1.3.0.tar.gz

Download URL material_color_palette-1.3.0.tar.gz
Size 122.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b2b57bde730cfb3f348c4acf4282ff16b803bd9c5d4bc2d376f7443c2176d8b7
BLAKE2b-256 checksum
How to use checksums
261ea286b37f7d9ec00aca624f5ff13151e00a198826cf3e2233ec2c3e5dfc47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / material_color_palette-1.3.0-py3-none-any.whl

Download URL material_color_palette-1.3.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95a3555242979101f724acc35adb11216fa480b4a6eed9dc3386b5251832a17a
BLAKE2b-256 checksum
How to use checksums
528a20930bc1e2abc551ef980a69ff9dec7accf6dcd25c48a81e5f8962e22190
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for material-color-palette 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for material_color_palette-1.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page