A comprehensive colour manipulation and evaluation library
Project description
Pyletteyes
A comprehensive Python library for colour manipulation and evaluation.
Easily create Colour objects to manipulate or transform as required. Palette objects offer a convenient methods for storing, accessing and scoring collections of Colour objects.
Features
- Colour space conversions (Hex, RGB, HSL)
- Colour manipulation (lighten, darken, complementary colours)
- Palette generation and analysis
- Image colour extraction
Installation
pip install pyletteyes
Basic Usage Example
from pyletteyes import Colour
from pyletteyes import Palette
# Create a colour and print RGB string
red = Colour.from_hex("#FF0000")
print(red) # outputs: rgb(255, 0, 0)
# Lighten it and output as HSL values
light_red = red.lighten(0.1)
print(light_red.hsl) # outputs: (0.0, 0.5980392156862745, 1.0)
# Darken it and print as an RGB string
dark_red = red.darken(0.2)
print(dark_red) # outputs: rgb(153, 0, 0)
# Get complementary colour and output as hex
complement = red.get_complementary()
print(complement.to_hex()) # outputs: #00feff
# Get a pastel from the complementary colour
pastel = complement.get_pastel()
print(pastel) # outputs: rgb(101, 203, 204)
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 pyletteyes-0.1.5.tar.gz.
File metadata
- Download URL: pyletteyes-0.1.5.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b167edc4fe77a64e40b6cf1d3f20ccb5763e256d6710d5926b775cbf642aa48
|
|
| MD5 |
a1933faa7fa328266864bba26fa8b743
|
|
| BLAKE2b-256 |
4da78dad96c65c8621dff455fc2cbb5e47a2b79a51318d95d99d8bf54266db8b
|
File details
Details for the file pyletteyes-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pyletteyes-0.1.5-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf8f398c8ec690ca371659bedcda638ad43ffa04335512249c53a3e34c8ba779
|
|
| MD5 |
714df89941867d36cafa0eeb19d3d80c
|
|
| BLAKE2b-256 |
9e6e960d38737c98e56bbe9871d988006b707342bdb40b35f4bc905961bd2946
|