Note that there is also a python implementation of the colorspace package available on github. More information about the development status of the python colorspace package can be found here: Alternatively you can use code similar to the snippet shown below: