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.2.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.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: colourtools-0.1.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/25.4.0

File hashes

Hashes for colourtools-0.1.2.tar.gz
Algorithm Hash digest
SHA256 60de7c243239bfc1882dcb44e54c70d50cf5fcf96115d0b003603683c52b5996
MD5 6e304b9093f2e3e9cb484e3c24361390
BLAKE2b-256 9d292a57adeee9d32f54e7ccd8ab2ccfc20938d664ee3582bb5be43f89400c07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: colourtools-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/25.4.0

File hashes

Hashes for colourtools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7ad4f3973eb88f679e2d81fb3857931d31639a0f784bdd601618501d7db51b42
MD5 4f60f5b42295c6b1383a5413f6c03f51
BLAKE2b-256 325a13272307dfeec0b660c286075552942044ef319bb542cdf511c39f7307cb

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