|
From: Friedrich R. <fri...@gm...> - 2010-08-09 20:40:50
|
2010/8/6 Benjamin Root <ben...@ou...>: > 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 |