# Color - Manual - Help File

# Table Of Content

- Introduction
  - History
  - Highlights
- Installation
- Usage
- Api
- Acknowledgements
- Changes
- References
- About

# Introduction

Color is a Python color science package implementing a comprehensive number of color transformations and manipulations objects.

## History

Color started as a raw conversion building block for The Moving Picture Company stills ingestion pipeline.

Generic objects have been extracted, reorganised and are now provided as a nice packaged API while keeping the undisclosable code private. The original MPC camelCase naming convention and code style has been changed for Pep8 compliance.

Matplotlib implementation idea is coming from the excellent Mark Kness's ColorPy Python package.

## Highlights

- RGB and XYZ color matching functions spectral data:

> - Stiles & Burch 1955 2° Observer RGB color matching functions.
> - Stiles & Burch 1959 10° Observer RGB color matching functions.
> - Standard CIE 1931 2° Observer XYZ color matching functions.
> - Standard CIE 1964 10° Observer XYZ color matching functions.
> - Standard CIE 2006 2° Observer XYZ color matching functions.
> - Standard CIE 2006 10° Observer XYZ color matching functions.

- Illuminants spectral data:

> - A
> - C
> - D50
> - D55
> - D60
> - D65
> - D75
> - F1
> - F2
> - F3
> - F4
> - F5
> - F6
> - F7
> - F8
> - F9
> - F10
> - F11
> - F12

- Photopic & Scotopic luminous efficiency functions spectral data:
  - CIE 1924 2 Degree Observer
  - Judd Modified CIE 1951 2 Degree Observer
  - Judd-Vos Modified CIE 1978 2 Degree Observer
  - Stockman, Jagle, Pirzer & Sharpe CIE 2008 2 Degree Observe
  - Stockman, Jagle, Pirzer & Sharpe CIE 2008 10 Degree Observer
  - Wald & Crawford CIE 1951 2 Degree Observer
- Correlated color temperature calculation:

> - Wyszecki & Roberston method implementation.
> - Yoshi Ohno method implementation.

- Spectral power distribution data manipulation and conversion to color.
- Blackbody spectral radiance calculation.
- Spectral bandpass correction.
- Chromatic adaptation with following methods:

> - XYZ Scaling.
> - Bradford.
> - Von Kries.
> - CAT02.

- Luminance, Munsell value and Lightness calculations:

> - Luminance 1943
> - Luminance 1976
> - Munsell Value 1920
> - Munsell Value 1933
> - Munsell Value 1943
> - Munsell Value 1944
> - Munsell Value 1955
> - Lightness 1958
> - Lightness 1964
> - Lightness 1976

- RGB Colorspaces support:

> - ACES RGB
> - ACES RGB Log
> - ACES RGB Proxy 10
> - ACES RGB Proxy 12
> - Adobe RGB 1998
> - Adobe Wide Gamut RGB
> - ALEXA Wide Gamut RGB
> - Apple RGB
> - Best RGB
> - Beta RGB
> - CIE RGB
> - ColorMatch RGB
> - DCI-P3
> - Don RGB 4
> - ECI RGB v2
> - Ekta Space PS 5
> - Max RGB
> - NTSC RGB
> - Pal/Secam RGB
> - ProPhoto RGB
> - Rec. 709
> - Rec. 2020
> - Russell RGB
> - S-Log
> - SMPTE-C RGB
> - Xtreme RGB
> - sRGB

- Colorspaces transformation and conversion:

> - Wavelength to XYZ.
> - Spectral to XYZ.
> - XYZ to xyY.
> - xyY to XYZ.
> - xy to XYZ.
> - XYZ to xy.
> - XYZ to RGB.
> - RGB to XYZ.
> - xyY to RGB.
> - RGB to xyY.
> - XYZ to UVW.
> - UVW to XYZ.
> - UVW to uv.
> - UVW uv to xy.
> - XYZ to Luv.
> - Luv to XYZ.
> - Luv to uv.
> - Luv uv to xy.
> - Luv to LCHuv.
> - LCHuv to Luv.
> - XYZ to Lab.
> - Lab to XYZ.
> - Lab to LCHab.
> - LCHab to Lab.
> - RGB to HSV.
> - HSV to RGB.
> - RGB to HSL.
> - HSL to RGB.
> - RGB to CMY.
> - CMY to CMYK.
> - CMYK to CMY.
> - CMY to RGB.
> - uv to cct, duv.
> - cct, duv to uv.

- Illuminants chromaticity coordinates data.
- Correlated color temperature calculation.
- Colorspaces derivation.
- Color difference calculation with following methods:

> - ΔE CIE 1976.
> - ΔE CIE 1994.
> - ΔE CIE 2000.
> - ΔE CMC.

- Color rendition chart data.
- Colorspaces visualisation within Autodesk Maya.
- First order color fit.
- Comprehensive plotting capabilities.

# Installation

The following dependencies are needed:

- Python 2.6.7 or Python 2.7.3: http://www.python.org/

To install Color from the Python Package Index you can issue this command in a shell:

    pip install ColorScience

or this alternative command:

    easy_install ColorScience

You can also install directly from Github source repository:

    git clone git://github.com/KelSolaar/Color.git
    cd Color
    python setup.py install

If you want to build the documentation you will also need:

- Tidy http://tidy.sourceforge.net/

# Usage

# Api

# Changes

# Acknowledgements

- Yoshi Ohno for helping me pinpointing the root cause of calculation discrepancies in my implementation of his CCT & Duv calculation method.
- Charles Poynton for taking time to reply to my questions.
- Michael Parsons for all the continuous technical advices.

# References

Wyszecki & Stiles, Color Science - Concepts and Methods Data and Formulae - Second Edition, Wiley Classics Library Edition, published 2000, ISBN: 0-471-39918-3

Stephen Westland, Caterina Ripamonti, Vien Cheung, Computational Colour Science Using MATLAB, 2nd Edition, The Wiley-IS&T Series in Imaging Science and Technology, published July 2012, ISBN: 978-0-470-66569-5

Edward J. Giorgianni & Thomas E. Madden, Digital Color Management: Encoding Solutions - Second Edition, Wiley, published November 2008, ISBN: 978-0-470-99436-8

Charles Poynton, Digital Video and HD: Algorithms and Interfaces, The Morgan Kaufmann Series in Computer Graphics, published 2 December 2012, ISBN: 978-0123919267

Charles Poynton, Color FAQ

Charles Poynton, Gamma FAQ

## Chromatic Adaptation

Bruce Lindbloom, XYZ Scaling Chromatic Adaptation (Last accessed 24 February 2014)

Bruce Lindbloom, Bradford Chromatic Adaptation (Last accessed 24 February 2014)

Bruce Lindbloom, Von Kries Chromatic Adaptation (Last accessed 24 February 2014)

CAT02 Chromatic Adaptation (Last accessed 24 February 2014)

## Color Rendition Charts

Babel Color ColorChecker RGB and Spectral Data (Last accessed 24 February 2014)

## Colorspace Derivation

Colorspace Derivation (Last accessed 24 February 2014)

## Color Difference

Bruce Lindbloom, ΔE CIE 1976 (Last accessed 24 February 2014)

Bruce Lindbloom, ΔE CIE 1994 (Last accessed 24 February 2014)

Bruce Lindbloom, ΔE CIE 2000 (Last accessed 24 February 2014)

Bruce Lindbloom, ΔE CMC (Last accessed 24 February 2014)

## Color Matching Functions

Stiles & Burch 1955 2 Degree Observer (Last accessed 24 February 2014)

Stiles & Burch 1959 10 Degree Observer (Last accessed 24 February 2014)

Standard CIE 1931 2 Degree Observer (Last accessed 24 February 2014)

Standard CIE 1964 10 Degree Observer (Last accessed 24 February 2014)

Standard CIE 2006 2 Degree Observer (Last accessed 24 February 2014)

Standard CIE 2006 10 Degree Observer (Last accessed 24 February 2014)

## Deprecated Transformations

RGB to HSV (Last accessed 18 May 2014)

HSV to RGB (Last accessed 18 May 2014)

RGB to HSL (Last accessed 18 May 2014)

HSL to RGB (Last accessed 18 May 2014)

RGB to CMY (Last accessed 18 May 2014)

CMY to RGB (Last accessed 18 May 2014)

CMY to CMYK (Last accessed 18 May 2014)

CMYK to CMY (Last accessed 18 May 2014)

## Illuminants Relative Spectral Power Distributions

A (Last accessed 24 February 2014)

D65 (Last accessed 24 February 2014)

C (Last accessed 24 February 2014)

D50 (Last accessed 24 February 2014)

D55 (Last accessed 24 February 2014)

D75 (Last accessed 24 February 2014)

F1 (Last accessed 24 February 2014)

F2 (Last accessed 24 February 2014)

F3 (Last accessed 24 February 2014)

F4 (Last accessed 24 February 2014)

F5 (Last accessed 24 February 2014)

F6 (Last accessed 24 February 2014)

F7 (Last accessed 24 February 2014)

F8 (Last accessed 24 February 2014)

F9 (Last accessed 24 February 2014)

F10 (Last accessed 24 February 2014)

F11 (Last accessed 24 February 2014)

F12 (Last accessed 24 February 2014)

Bruce Lindbloom, D60 (Last accessed 5 April 2014)

## Illuminants Chromaticity Coordinates

Illuminants Chromaticity Coordinates (Last accessed 24 February 2014)

## Luminance, Munsell value, Lightness

Luminance (Last accessed 24 February 2014)

Luminance 1943 (Last accessed 13 April 2014)

Luminance 1976 (Last accessed 12 April 2014)

Munsell Value 1920 (Last accessed 13 April 2014)

Munsell Value 1933 (Last accessed 13 April 2014)

Munsell Value 1943 (Last accessed 13 April 2014)

Munsell Value 1944 (Last accessed 13 April 2014)

Munsell Value 1955 (Last accessed 13 April 2014)

Lightness 1958 (Last accessed 13 April 2014)

Lightness 1964 (Last accessed 13 April 2014)

Charles Poynton, Lightness 1976 (Last accessed 12 April 2014)

## Luminous Efficiency Functions

CIE 1924 2 Degree Observer (Last accessed 19 April 2014)

Judd Modified CIE 1951 2 Degree Observer (Last accessed 19 April 2014)

Judd-Vos Modified CIE 1978 2 Degree Observer (Last accessed 19 April 2014)

Stockman, Jagle, Pirzer & Sharpe CIE 2008 2 Degree Observe (Last accessed 19 April 2014)

Stockman, Jagle, Pirzer & Sharpe CIE 2008 10 Degree Observer (Last accessed 19 April 2014)

Wald & Crawford CIE 1951 2 Degree Observer (Last accessed 19 April 2014)

## Planc's Law

Planck's Law (Last accessed 24 February 2014)

## RGB Colorspaces

ACES RGB Colorspace (Last accessed 24 February 2014)

ACES RGB Log Colorspace (Last accessed 17 May 2014)

ACES RGB Proxy 10 Colorspace (Last accessed 17 May 2014)

ACES RGB Proxy 12 Colorspace (Last accessed 17 May 2014)

Adobe RGB 1998 Colorspace (Last accessed 24 February 2014)

Adobe Wide Gamut RGB Colorspace (Last accessed 13 April 2014)

ALEXA Wide Gamut RGB Colorspace (Last accessed 13 April 2014)

Apple RGB Colorspace (Last accessed 11 April 2014)

Best RGB Colorspace (Last accessed 11 April 2014)

Beta RGB Colorspace (Last accessed 11 April 2014)

CIE RGB Colorspace (Last accessed 24 February 2014)

C-Log Colorspace (Last accessed 18 April 2014)

ColorMatch Colorspace (Last accessed 12 April 2014)

DCI-P3 Colorspace (Last accessed 24 February 2014)

Don RGB 4 Colorspace (Last accessed 12 April 2014)

ECI RGB v2 Colorspace (Last accessed 13 April 2014)

Ekta Space PS 5 Colorspace (Last accessed 13 April 2014)

Max RGB Colorspace (Last accessed 12 April 2014)

NTSC RGB Colorspace (Last accessed 13 April 2014)

Pal/Secam RGB Colorspace (Last accessed 13 April 2014)

Pointer's Gamut (Last accessed 24 February 2014)

ProPhoto RGB Colorspace (Last accessed 24 February 2014)

Rec. 709 Colorspace (Last accessed 24 February 2014)

Rec. 2020 Colorspace (Last accessed 13 April 2014)

Russell RGB Colorspace (Last accessed 11 April 2014)

S-Log Colorspace (Last accessed 13 April 2014)

SMPTE-C RGB Colorspace (Last accessed 13 April 2014)

sRGB Colorspace (Last accessed 24 February 2014)

Xtreme RGB Colorspace (Last accessed 12 April 2014)

## Spectral

Spectral to XYZ, Wyszecki & Stiles, Color Science - Concepts and Methods Data and Formulae - Second Edition, Page 158.

Spectral Bandpass Correction, Stearns, Stephen Westland, Caterina Ripamonti, Vien Cheung, Computational Colour Science Using MATLAB, 2nd Edition, Page 38.

## Temperature

Yoshi Ohno, Practical Use and Calculation of CCT and Duv (Last accessed 3 March 2014)

## Transformations

Bruce Lindbloom, XYZ to xyY (Last accessed 24 February 2014)

Bruce Lindbloom, xyY to XYZ (Last accessed 24 February 2014)

XYZ to UVW (Last accessed 24 February 2014)

UVW to XYZ (Last accessed 24 February 2014)

UVW to uv (Last accessed 24 February 2014)

UVW uv to xy (Last accessed 24 February 2014)

Bruce Lindbloom, XYZ to Luv (Last accessed 24 February 2014)

Bruce Lindbloom, Luv to XYZ (Last accessed 24 February 2014)

Luv to uv (Last accessed 24 February 2014)

Luv uv to xy (Last accessed 24 February 2014)

Bruce Lindbloom, Luv to LCHuv (Last accessed 24 February 2014)

Bruce Lindbloom, LCHuv to Luv (Last accessed 24 February 2014)

Bruce Lindbloom, XYZ to Lab (Last accessed 24 February 2014)

Bruce Lindbloom, Lab to XYZ (Last accessed 24 February 2014)

Bruce Lindbloom, Lab to LCHab (Last accessed 24 February 2014)

Bruce Lindbloom, LCHab to Lab (Last accessed 24 February 2014)

# About

Color by Thomas Mansencal - Michael Parsons - 2013 - 2014
Copyright © 2013 - 2014 – Thomas Mansencal – thomas.mansencal@gmail.com
This software is released under terms of GNU GPL V3 license: http://www.gnu.org/licenses/
http://www.thomasmansencal.com/