Skip to main content

A comprehensive colour manipulation and evaluation library

Project description

Pyletteyes

A comprehensive Python library for colour manipulation and evaluation.

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.colour import Colour

# 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyletteyes-0.1.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyletteyes-0.1.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file pyletteyes-0.1.1.tar.gz.

File metadata

  • Download URL: pyletteyes-0.1.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for pyletteyes-0.1.1.tar.gz
Algorithm Hash digest
SHA256 491acd5ccce3e197733653cf7482f238ffa809ef20d6ee2fc030206d74be5908
MD5 a08c8961c2a232a84a8e5f740cdbe195
BLAKE2b-256 8ab3c8ccfe0216a62080a6d2eb1e48f94e0f00b2665f99d6776fb0fdbbe7c1b7

See more details on using hashes here.

File details

Details for the file pyletteyes-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyletteyes-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for pyletteyes-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 877b5d51c6e3d84eaad8dc5b056cb56c21fd84f69c563d31117b55e929fd049d
MD5 f33de8b948fd6fe9bdb508ef2392c497
BLAKE2b-256 a9992deee4d200dea421897aceb3ea40357c3b4127036c70ce679f8f587a297e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page