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.1.tar.gz (5.3 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.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: colourtools-0.1.2.1.tar.gz
  • Upload date:
  • Size: 5.3 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.2.1.tar.gz
Algorithm Hash digest
SHA256 c6599005f189afd419255812da2fcc2400720f31c8a465987d34761699c6ecb0
MD5 2caa036e5f51707657ed5d3c14426698
BLAKE2b-256 ab63ebeba1eb18ffefe75ba7b184a3972d6ffdc9206f7c80fb0eaab31376cac7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: colourtools-0.1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0fb31d60428e4c2db4c9158e677d81e90ed09f14f2cfe26743daa1ac921a7c73
MD5 5abb046520abfaf0d40ea5744bebe767
BLAKE2b-256 77f5b4f12321903a09b86e0865ab791613e17e18671f359a4c5eca91c39bc858

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