Skip to main content

Color handling made simple.

Project description

Chroma

Chroma is a Python module for handling colors with ease.

Quickstart

import chroma

# Create a Color object
color = chroma.Color('#00FF00')

# Get RGB, HLS, and HSV in either float or 0 - 255 (8bit)
# Also, HEX
color.rgb # (0.0, 1.0, 0.0)
color.hls # (0.3333333333333333, 0.5, 1.0)
color.rgb256 # (0, 255, 0)
color.hex = # '#00FF00'

# Set RGB, HLS, HSV (float or 256) and HEX
color.rgb256 = (255, 0, 0)
color.hls = (0.0, 1.0, 0.0)

Currently supports RGB, HLS, HSV and HEX (#RRGGBB) coordinates.

BSD licensed. Hosted on Github and available on PyPI.

Installation:

pip install tungsten

History

0.1.1 (2012-12-16)

  • HLS, HSV Support

  • API changes (setter methods)

  • Bug Fixes

  • Update to README

0.1.0 (2012-12-15)

  • Initial Release

  • RGB and Hex support

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

Chroma-0.1.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Supported by

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