Utility to easily use palettes
There are two palettes material and flat.
You can view them in a svg file. Those have been custom made using tints.dev.
You can view them in a svg file. More info at material.io.
You can view them in a svg file. More info at html color codes.
You can view them in a svg file. More info at tailwind colors.
You can install it with pip by running:
pip install v-palette
You can retrive one color or a list of colors using get_colors
function:
from v_palette import get_colors
# 1. Retrive one color
get_colors(("red", 100)) # out: '#FFCDD2'
# 2. Retrive some colors
get_colors([("red", 100), ("blue", 100)]) # out: ['#FFCDD2', '#BBDEFB']
# 3. Retrive colors from others palettes
get_colors([("emerald", 100), ("silver", 100)]) # out: ['#D5F5E3', '#F2F3F4']
get_colors([("emerald", 100), ("silver", 100)], palette="flat") # out: ['#D5F5E3', '#F2F3F4']
The parameter
palette
is not necessary if the color you want is not present in the material palette. Since if the color is not found in the default palette it will look at the others palettes.
This package relies on poetry and pre-commit
. In order to develop you need to install both libraries with:
pip install poetry pre-commit
poetry install
pre-commit install
Then you need to add poetry run
before any python shell command. For example:
# DO
poetry run python master.py
# don't do
python master.py
The content of this repository is licensed under a MIT.
Branches and commits use some prefixes to keep everything better organized.
- f/: features
- r/: releases
- h/: hotfixs
- [NEW] new features
- [FIX] fixes
- [REF] refactors
- [PYL] pylint improvements
- [TST] tests