Material You color generation algorithms in pure python!
Project description
materialyoucolor-pyhton
Material You color algorithms for python (crossplatform)!
SEE : https://m3.material.io/styles/color/dynamic-color/overview
How does it works?
Android performs the following steps to generate color schemes from a user's wallpaper.
-
The system detects the main colors in the selected wallpaper image and extracts a source color.
-
The system uses that source color to further extrapolate five key colors known as Primary, Secondary, Tertiary, Neutral, and Neutral variant.
Figure 1. Example of source color extraction from wallpaper image and extraction to five key colors
- The system interprets each key color into a tonal palette of 13 tones.
Figure 2. Example of generating a given tonal palettes
- The system uses this single wallpaper to derive five different color schemes, which provides the basis for any light and dark themes.
SEE MORE: https://developer.android.com/develop/ui/views/theming/dynamic-colors
Where to use this colors?
SEE : https://m3.material.io/styles/color/the-color-system/color-roles
Install
Always use master branch
pip install https://github.com/T-Dynamos/materialyoucolor-pyhton/archive/main.zip
Documentation
Please see example.py
, its well documented by AI.
Example
Install kivy,pillow, kivymd and then run example.py
file.
Make sure to edit variables in example.py file, like
IMAGE_FILE = "/home/tdynamos/Downloads/test.png" # file
Input | Output |
---|---|
See all tokens : https://m3.material.io/styles/color/the-color-system/tokens
Credits
https://github.com/fengsp/color-thief-py/blob/master/colorthief.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for materialyoucolor-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa0f4915b55e21a4c21475fe88620f9cc1c7acd62bbd2c91b15f54fbaec68799 |
|
MD5 | ca097c3b4f8b947554195cc978a3805f |
|
BLAKE2b-256 | c53042f12af7e5eee14acfd9101728032605f6d01aa5fd11d87b8f9849c45d14 |