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

Uploaded Python 3

File details

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

File metadata

  • Download URL: colourtools-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 139dd7baca8fbbe35e523e7162356683383b28513190748b627a87c78e371055
MD5 f90e1d991b05d23650880c077e710e51
BLAKE2b-256 f28fc36bb380eef040900b564b52212457f0cbf2085c410931fdbb018c4beb57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: colourtools-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8bdf2b5441e747c7d6c5db750614c464727638cae2d246263a6ae25b936594d0
MD5 0bb7871025796adc775e5c4cad71c130
BLAKE2b-256 d4c6d0f4e5fd863c74db8ee6d5264ce661c0388e0e4f5231d5d0ae78983d10ad

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