Skip to main content

colourtools is a lightweight Python library for intuitive conversion and manipulation of colours across multiple formats

Project description

colourtools

colourtools is a lightweight Python library for intuitive conversion and manipulation of colours across multiple formats.

Features

  • Convert between CMYK, RGB, and HEX colour spaces
  • Support for both integer and floating-point representations
  • Simple, readable API for common colour transformations
  • Utility functions for encoding and decoding colour values
  • Designed for clarity, reliability, and easy integration into your projects

Example Usage

from colourtools import cmyk_to_rgb, rgb_to_cmyk, hex_to_rgb

rgb = cmyk_to_rgb((0, 1, 1, 0))       # Convert CMYK to RGB
cmyk = rgb_to_cmyk((255, 0, 0))       # Convert RGB to CMYK
rgb = hex_to_rgb("#FF0000")           # Convert HEX to RGB

Installation

pip install colourtools

License

MIT License

colourtools makes colour conversion in Python simple, consistent, and accessible for everyone—no matter how you spell it.

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

colourtools-0.1.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

colourtools-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: colourtools-0.1.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Darwin/24.5.0

File hashes

Hashes for colourtools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 15ee45b65462752351ba9efdcc134c19e4e26063053d6b86205daa5c94720ed6
MD5 e794b990b14b4160cfbc86ec118cffb6
BLAKE2b-256 e1e4158b0ba75c19cd457d42aa23f6a367cdc9c41fab07cb8f069424c7d8b5ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: colourtools-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Darwin/24.5.0

File hashes

Hashes for colourtools-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 569cc74bff77cf9751afeaf9fa6bc349763d067c07827875690167429e8fbb25
MD5 75999165f560671e894b5697681ef1f8
BLAKE2b-256 124455c32c166162ebe2de58f51129ff1d7fffaad4e8d1c6403f41b1b0f1092a

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