2010/8/6 Benjamin Root <ben.r...@ou.edu>:
> Actually, I have been looking at a somewhat related problem.  It might be a
> useful feature in matplotlib.color to provide a function that can take a
> colormap and produce a grayscale version of it.  In my limited amount of
> research, I have found that one could convert the rgb values into hsv or hsl
> and use the "value" or "lightness" respectively for the grayscale value.  I
> forget which one was aesthetically better, though.

http://www.pythonware.com/library/pil/handbook/image.htm :

"When from a colour image to black and white, the library uses the
ITU-R 601-2 luma transform:

    L = R * 299/1000 + G * 587/1000 + B * 114/1000
"

That should also be easy to implement.

Friedrich

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to