Hacker News new | past | comments | ask | show | jobs | submit login
Colour Science for Python (colour-science.org)
53 points by kelsolaar on Sept 2, 2014 | hide | past | favorite | 23 comments



We have an introductory tutorial (http://colour-science.org/tutorial.php) showcasing some features of the API and we have started some IPython Notebooks (http://nbviewer.ipython.org/github/colour-science/colour-ipy...) to cover it deeply along with the theoretical aspect.


Wonderful work.

Any chance of a C or C++ implementation?


There are already C/C++ implementations of most of this, and Matlab implementations, if you go hunting around.

If there’s something specific you need, some of the algorithms have some fiddly parts, but there’s not too much that’s fundamentally difficult to implement in any of them. Any particular part should only take a day or two to build for some one-off use case.


There are tons of them. OS X and Windows both have color management APIs as standard system components, and there are open source solutions for those and other OS's as well (http://www.littlecms.com for one).


I don't think so, like stated in the below comments, there are already quite a few implementation.


Shameless plug for python-colormath, which has been cooking since about 2008: http://python-colormath.readthedocs.org/

Has a lot of the same conversions/comparisons/color spaces, excellent test coverage, and in my own biased opinion, pretty good documentation.


See also the fantastic Color.jl, a Julia package with similar functionality. Makes very pretty IJulia notebooks! More info at https://github.com/JuliaLang/Color.jl or just run Pkg.add("Color") at your Julia REPL.


I'd be curious about a comparison of the capabilities and approaches of these two libraries. Color.jl got to be quite comprehensive almost by accident.


Color.jl is excellent! They have a few stuff we don't support like DIN99 colourspace related computations and colour deficiency support, on an other hand I think we have one of the largest dataset around, the features pages will give you a nice overview: http://colour-science.org/features.php


I've been peripherally interested in colo[u]r science for a while, and as a software guy was amazed to discover the complexities of accurately describing and computing color across a not-so-wide range of devices (my LCD screen, your LCD screen, that projector, this printer...).

For example, I was looking for a way to find "perceptual distance" between colours, since the standard RGB rainbow gives more space for green than, say, yellow. Turns out there are colour spaces for that: CIELAB and CIELUV! However, converting between these spaces and RGB is... fun.

(also, a fun way to tick off your illustrator friends is to install F.Lux on their computer)

Thank you for this great library!


CIELAB is great. Even just being able to average colors is really useful.


    import colour as color


See my comment for the reason why it was named "colour": https://news.ycombinator.com/item?id=8261668


Why do you hate the English language? ;-)


I'm surprised how at how poorly documented colour profile conversion is. I'm using Django for a webapp that takes images from a bunch of sources and primarily in AdobeRGB, and using Pillow to do the colour profile conversion has been... interesting...


Yeah, it's sadly true.

I would also like to add that most of the publications are very highly priced which make them not easily accessible.

I had to buy a few of them and an account on OSA for a few hundreds dollars.


Other than the silly British spelling of color, looks like great work!

If you guys are ever in the SF Bay Area, shoot me a note and I’ll buy you a coffee.

(For people looking for JavaScript implementations, I put a CIECAM02 implementation and some other stuff at https://github.com/jrus/chromatist)


Actually, in the begining, the API was named "color" , I decided to go for "colour" because the CIE is using "colour" and not "color": http://eilv.cie.co.at/termlist?field_term_search_value_op=co...


Are you serious about your remark about spelling? I must say it caught my attention, but why would it be silly?


Most of the world's English speakers spell color w/o the u. (292 million Americans, 44 million Filipinos)


I think you are forgetting one billion plus Indians.


Probably because British people are silly -- John Cleese, Benny Hill, etc.


Us Canucks also enjoy an extra u here and there :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: