Skip to content

arpitjain799/colour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Colour

https://secure.travis-ci.org/KelSolaar/Colour.png?branch=master

https://gemnasium.com/KelSolaar/Colour.png

Introduction

Colour is a Python colour science package implementing a comprehensive number of colour theory transformations and algorithms.

Highlights:

  • RGB and XYZ colour matching functions spectral data:
  • Wright & Guild 1931 2 Degree RGB CMFs RGB colour matching functions.
  • Stiles & Burch 1955 2 Degree RGB CMFs RGB colour matching functions.
  • Stiles & Burch 1959 10 Degree RGB CMFs RGB colour matching functions.
  • CIE 1931 2 Degree Standard Observer XYZ colour matching functions.
  • CIE 1964 10 Degree Standard Observer XYZ colour matching functions.
  • CIE 2012 2 Degree Standard Observer XYZ colour matching functions.
  • CIE 2012 10 Degree Standard Observer XYZ colour matching functions.
  • Cone fundamentals spectral data:
  • Stockman & Sharpe 2 Degree Cone Fundamentals.
  • Stockman & Sharpe 10 Degree Cone Fundamentals.
  • Photopic & Scotopic luminous efficiency functions spectral data:
  • CIE 1924 Photopic Standard Observer
  • Judd Modified CIE 1951 Photopic Standard Observer
  • Judd-Vos Modified CIE 1978 Photopic Standard Observer
  • CIE 1964 Photopic 10 Degree Standard Observer
  • CIE 2008 2 Degree Physiologically Relevant LEF
  • CIE 2008 10 Degree Physiologically Relevant LEF
  • CIE 1951 Scotopic Standard Observer
  • Illuminants spectral data:
  • A
  • B
  • C
  • D50
  • D55
  • D60
  • D65
  • D75
  • E
  • F1
  • F2
  • F3
  • F4
  • F5
  • F6
  • F7
  • F8
  • F9
  • F10
  • F11
  • F12
  • FL3.1
  • FL3.2
  • FL3.3
  • FL3.4
  • FL3.5
  • FL3.6
  • FL3.7
  • FL3.8
  • FL3.9
  • FL3.10
  • FL3.11
  • FL3.12
  • FL3.13
  • FL3.14
  • FL3.15
  • HP1
  • HP2
  • HP3
  • HP4
  • HP5
  • Colour rendition charts spectral data.
  • Colour appearance models:
  • CIECAM02
  • Correlated colour temperature calculation:
  • Roberston method implementation.
  • Yoshi Ohno method implementation.
  • McCamy method implementation.
  • Hernandez-Andres, Lee & Romero method implementation.
  • Kang, Moon, Hong, Lee, Cho and Kim implementation.
  • CIE Illuminant D Series implementation.
  • Colour matching functions conversions for educational purpose:
  • Wright & Guild 1931 2 Degree RGB CMFs to CIE 1931 2 Degree Standard Observer
  • Stiles & Burch 1959 10 Degree RGB CMFs to CIE 1964 10 Degree Standard Observer
  • Stiles & Burch 1959 10 Degree RGB CMFs to Stockman & Sharpe 10 Degree Cone Fundamentals
  • Stockman & Sharpe 2 Degree Cone Fundamentals to CIE 2012 2 Degree Standard Observer
  • Stockman & Sharpe 10 Degree Cone Fundamentals to CIE 2012 10 Degree Standard Observer
  • Spectral power distribution data manipulation and conversion to tristimulus values.
  • Blackbody spectral radiance calculation.
  • Spectral bandpass correction.
  • Sprague interpolation.
  • Chromatic adaptation with following methods:
  • XYZ Scaling.
  • Bradford.
  • Von Kries.
  • CAT02.
  • Luminance, Munsell value and Lightness calculations:
  • Luminance Newhall 1943
  • Luminance 1976
  • Luminance ASTM D1535-08
  • Munsell Value Priest 1920
  • Munsell Value Munsell 1933
  • Munsell Value Moon 1943
  • Munsell Value Saunderson 1944
  • Munsell Value Ladd 1955
  • Munsell Value McCamy 1987
  • Munsell Value ASTM D1535-08
  • Lightness Glasser 1958
  • Lightness Wyszecki 1964
  • Lightness 1976
  • RGB Colourspaces 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
  • Colourspaces transformations:
  • 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.
  • RGB to RGB.
  • XYZ to UCS.
  • UCS to XYZ.
  • UCS to uv.
  • UCS uv to xy.
  • XYZ to UVW.
  • 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.
  • uv to CCT, Duv.
  • CCT, Duv to uv.
  • xyY to Munsell Colour.
  • Munsell Colour to xyY.

Convenience deprecated colourspaces transformations:

  • RGB to HSV.
  • HSV to RGB.
  • RGB to HSL.
  • HSL to RGB.
  • RGB to CMY.
  • CMY to RGB.
  • CMY to CMYK.
  • CMYK to CMY.
  • RGB to HEX.
  • HEX to RGB.
  • Illuminants chromaticity coordinates data.
  • Colourspaces derivation.
  • Colour difference calculation with following methods:
  • ΔE CIE 1976.
  • ΔE CIE 1994.
  • ΔE CIE 2000.
  • ΔE CMC.
  • Colour rendering index calculation.
  • Colour rendition chart data.
  • RGB colourspaces visualisation within Autodesk Maya.
  • First order colour fit.
  • Comprehensive plotting capabilities.

Installation

The following dependencies are needed:

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

pip install colour-science

or this alternative command:

easy_install colour-science

You can also install directly from Github source repository:

git clone git://github.com/colour-science/colour.git
cd colour
python setup.py install

Usage

Api

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 replying 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-10: 0-471-39918-3
  • Mark D. Fairchild, Color Appearance Models, 2nd Edition, The Wiley-IS&T Series in Imaging Science and Technology, published 19 November 2004, ISBN-13: 978-0470012161
  • 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-13: 978-0-470-66569-5
  • Richard Sewall Hunter, The Measurement of Appearance, 2nd Edition, published August 25, 1987, ISBN-13: 978-0471830061
  • Edward J. Giorgianni & Thomas E. Madden, Digital Colour Management: Encoding Solutions - Second Edition, Wiley, published November 2008, ISBN-13: 978-0-470-99436-8
  • Charles Poynton, Digital Video and HD: Algorithms and Interfaces, The Morgan Kaufmann Series in Computer Graphics, published December 2, 2012, ISBN-13: 978-0123919267
  • Charles Poynton, Color FAQ
  • Charles Poynton, Gamma FAQ

Algebra

Planckian Radiator

Chromatic Adaptation Transforms

Colour Appearance Models

  • CIECAM02, Mark D. Fairchild, Color Appearance Models, 2nd Edition, The Wiley-IS&T Series in Imaging Science and Technology, published 19 November 2004, ISBN-13: 978-0470012161, Pages 265-277., CIECAM02, 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-13: 978-0-470-66569-5, Pages 88-92., The CIECAM02 Color Appearance Model (Last accessed 30 July 2014)

Colour Rendering Index

Colour Rendition Charts

Colourspace Derivation

Colour 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)

Colour Matching Functions

Cone Fundamentals

Correlated Colour Temperature

Deprecated Transformations

Illuminants Relative Spectral Power Distributions

  • A (Last accessed 24 February 2014)
  • B (Last accessed 12 June 2014)
  • C (Last accessed 24 February 2014)
  • D50 (Last accessed 24 February 2014)
  • D55 (Last accessed 24 February 2014)
  • Bruce Lindbloom, D60 (Last accessed 5 April 2014)
  • D65 (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)
  • FL3.1 (Last accessed 12 June 2014)
  • FL3.2 (Last accessed 12 June 2014)
  • FL3.3 (Last accessed 12 June 2014)
  • FL3.4 (Last accessed 12 June 2014)
  • FL3.5 (Last accessed 12 June 2014)
  • FL3.6 (Last accessed 12 June 2014)
  • FL3.7 (Last accessed 12 June 2014)
  • FL3.8 (Last accessed 12 June 2014)
  • FL3.9 (Last accessed 12 June 2014)
  • FL3.10 (Last accessed 12 June 2014)
  • FL3.11 (Last accessed 12 June 2014)
  • FL3.12 (Last accessed 12 June 2014)
  • FL3.13 (Last accessed 12 June 2014)
  • FL3.14 (Last accessed 12 June 2014)
  • FL3.15 (Last accessed 12 June 2014)
  • HP1 (Last accessed 12 June 2014)
  • HP2 (Last accessed 12 June 2014)
  • HP3 (Last accessed 12 June 2014)
  • HP4 (Last accessed 12 June 2014)
  • HP5 (Last accessed 12 June 2014)

Illuminants Chromaticity Coordinates

Lightness

Luminance

Luminous Efficiency Functions

Munsell Renotation System

Munsell Value

Optimal Colour Stimuli

  • A, Wyszecki & Stiles, Color Science - Concepts and Methods Data and Formulae - Second Edition, Wiley Classics Library Edition, published 2000, ISBN-10: 0-471-39918-3, Pages 776, 777
  • C, David MacAdam. Maximum Visual Efficiency of Colored Materials JOSA, Vol. 25, Pages 361, 367
  • D65, Wyszecki & Stiles, Color Science - Concepts and Methods Data and Formulae - Second Edition, Wiley Classics Library Edition, published 2000, ISBN-10: 0-471-39918-3, Pages 778, 779

RGB Colourspaces

Spectrum

Transformations

About

Colour by Colour Developers - 2013 - 2014
Copyright © 2013 - 2014 – Colour Developers – colour-science@googlegroups.com
This software is released under terms of GNU GPL V3 license: http://www.gnu.org/licenses/

About

Colour Science for Python

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.8%
  • TeX 2.2%