Canvas should not be working in sRGB

Bug #1457053 reported by houz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

When using the CMS mode to specify fill colors I can use any profile added in the document properties. However, it seems that Inkscape limits its canvas to be sRGB (probably a limitation inherited from cairo) so that subsequent steps like using a display profile is only half useful.
The problem is that the color profile I specified my color in can be bigger than sRGB, like AdobeRGB or many others, and probably also many CMYK profiles. Going through sRGB will shrink the effectively used colors to sRGB though, making the use of any bigger space pointless.
I attached both a SVG and a PNG showing the result. You don't have the "Laptop" profile, but it's enough to know that it's something smaller than sRGB.

I am well aware that this is a big thing to change, maybe requiring a new renderer or someone convincing cairo to support more than sRGB. In the long run it's essential though to get correct colors out of Inkscape.

Tags: color
Revision history for this message
houz (houz) wrote :
Revision history for this message
houz (houz) wrote :
Revision history for this message
houz (houz) wrote :
Download full text (9.8 KiB)

As requested by Tavmjong I wrote up some explanations about the current state and what I would expect to see. I will send it to the devel mailing list, too. Maybe it can start some discussion.

First of all I beg your pardon for the wall of text. If you know about color spaces just skip the "Theory" part.

In the following description I will only talk about RGB color spaces. For things like CMYK the same resoning applies but I want to keep it simple. For the sake of readability. I will also simplify a terrible lot to keep this beginner friendly and easy to understand. Like, seriously simplify. No need to point that out. I am also aware that some of the limitations might be coming from the SVG specs or are at least implied in there (like the mandatory blending in gamma corrected or linear sRGB).

Theory

When we talk about (RGB, see above) colors we often only mention three numbers representing the value for each of the red, green and blue channel. In general 0 means "nothing" and 255 (8 bit values) or 1.0 (float values) means "full power". I will use the float notation here since it's easier to calculate in the head. Thus, something like (1, 0, 0) means "the reddest red" and (1, 1, 1) is "white".

Now, there is a problem once you want to display such a color: What does "full power" or "the reddest red" actually mean? That's where color spaces come into play. They define a set of "primaries" that tell us what "red", "green" and "blue" actually mean. They are defined in absolute, real world means (most often in XYZ) that directly relate to specific wavelengths of light and precisely define a color that can be displayed. With that knowledge it's possible to say that (1, 0, 0) is not just some reddest red, but what it looks exactly like. Every other color inside the [0..1] range per channel can thus be defined, too. Some popular color spaces are sRGB and AdobeRGB in the RGB world. The CMYK world has things like "ISO Coated v2".

Of course there is more than just one color space and most have different primaries. The colors that can be described with a given set of primaries is called the "gamut" of a color space – not to be confused with the color space's "gamma"! We will ignore the latter.

Now that we know that the same triplet of numbers does mean something different in different color spaces we also understand that the numbers alone are meaningless without a color space. Since there is a terribly large number of images – both raster and vector – without any color profile information attached there is the common default of assuming sRGB.

When looking at articles about color spaces there are almost always images of a horse shoe formed colorful diagram with a triangle ontop (like https://commons.wikimedia.org/wiki/File:CIE1931xy_gamut_comparison.svg). The background horse shoe represents all possible colors a typical human can see while the corners of the triangle are just the aforementioned primaries. The area of the triangle covers the colors that the colorspace can display*. With the AdobeRGB triangle being bigger than the sRGB one (and completely covering it) we can easily see that AdobeRGB contains colors that are not expressable in sRGB...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.