
On Feb 21, 2011, at 2:27 PM, <J.B.C.Engelen@...1887...> wrote:
I just committed a new display mode: grayscale. It is separate from the other display modes. The grayscale mode is a "Color display mode", see the menu. When activated, it shows all colors in grayscale on-canvas. This does not (yet?) influence exporting, or saving. It only concerns the on-canvas view of the file, like outline display mode.
Right now, there is no preference to change the grayscale calculation. At the moment it uses: grayscale value = 0.33 * red + 0.59 * green + 0.11 * blue. I found this somewhere on internet, but forgot where, and it might be wrong/unusual. I intended to add a preference setting for these values, but have not done so. Let me know if that is desired.
Cool.
The first note is that the function you have there is for general display primaries of TV's from North America, if I recall correctly. It also probably should be performed on linear RGB values, not the gamma loaded sRGB values that SVG uses, and then converted back from linear once it is done.
In the long run, I think we need to clarify what the goals are. If one merely wants to preview "if this were gray", then a better solution would be to leverage LittleCMS and hook into the display chain. We already have code for previewing, so it is "only" a matter of hooking in a proper grayscale ICC profile. :-)
For grayscale, I could see the usefulness of actually allowing one to "apply" this to a drawing. That is, once the user likes the looks of things they can press "Do it" to convert all the sRGB colors in the drawing to their gray values.
However, I think that overall it would be good to allow for a few common "views" of the drawing. "As grayscale", or as "protanopia color blindness", "tritanopia...", etc. or even "PC Display", "Mac Display", etc.
So in general I think having a few modes with 'baked in' color ICC profiles instead of raw code to do a conversion would be more flexible and more useful to the end users. Also it would probably be easier to finish the last 20% of getting the code correct.