A collection of color palettes.
Project description
pencils
Pancils is a Python library with a colletion of color palettes.
Currently available palettes:
- Everything from flatuicolors.com
- Most of the palettes from materialui.co
- Tailwind color palette.
- Bootstrap color palette.
- CSS (HTML) color names.
Features:
- A lot of colors from manually picked palettes.
- 100% type safe.
- Best integration with IDEs, autocomplete all the way down.
- Includes multiple representations (HEX, RGB, HSL) for each color.
- Zero-dependency.
Installatiion:
python3 -m pip install pencils
Usage
Get the hex representation of "Sunflower" color from Dutch Palette of Flat UI Colors:
import pencils
pencils.NLPalette.colors.sunflower.value.hex
# 'FFC312'
The color: ◼◼◼
That's a lot of attributes and each one of them has a meaning:
NLPaletteis an instance of thepencils.Paletteclass which holds information about palette name, author, source URL, and even emojis associated with the palette.colorsattribute is an enum, a subclass ofpencils.Colors.sunfloweris the color ID.valueis used to get the value of the enum. The value is an instance ofpencils.Colorclass which contains operations on colors.hexis a lowercase hex representaion of the color without#.
Make the color darker:
color = pencils.NLPalette.colors.sunflower.value.hsl
color.lightness = .2
color.hex
# '664c00'
The color: ◼◼◼
Get random color from a random palette:
pencils.random_palette().random_color()
# Color(name='Unmellow Yellow', hex='fffa65')
The color: ◼◼◼
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pencils-0.1.0.tar.gz.
File metadata
- Download URL: pencils-0.1.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d76b3e0024b3f898a90f7c38b541d4a6fbaddae0b72a32a098e33d1c32b19333
|
|
| MD5 |
4314ed84e2b85b0e1fba23477ee7a92c
|
|
| BLAKE2b-256 |
54e050f36a7131876c1c44367765b105816160789f1f4f3bf849e6fc554ec4ed
|
File details
Details for the file pencils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pencils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77571782f838b66bbeaf9feaf68277ecafa39bd428b43f2d0604d09897070c20
|
|
| MD5 |
cf2a9f4ba5a03ef093c8ffd3ade74b17
|
|
| BLAKE2b-256 |
bf5c99fa2744951a3bcfb43b405a3020f55144b6e82510c6a133238467cb4ad3
|