Hi Nicolas,
sRgb and AdobeRgb are using D65 luminant. How can you compute a saturation if you are not using the same luminant ?
Thanks to a process known as
chromatic adaptation. PixInsight implements the Bradford chromatic adaptation algorithm.
Also why do you use D50 as default in the default RGBWS ?
Because it is the
ICC standard illuminant, i.e. the illuminant used by all ICC profiles. For performance reasons, the whole platform must use the same illuminant, and D50 seemed the most logical choice when I was designing PI's color engine, back in 2003 (in the days of PixInsight LE).
I agree that using different icc profiles doesn't change the value of each color (with no transform), but it changes the gamut of the final image.
Note that the concept of color gamut refers to an a posteriori interpretation of the data, when the image has to be represented on physical media and devices, or if the image is going to be stored with limited numerical accuracy. You can embed any color profile of your choice in an image without altering its pixel values. Whether or not the embedded profile represents how the image is intended to be seen is another story, but the image itself does not change.
How large is RGBWS.
The RGBWS in PixInsight is a theoretical space not tied to any physical device. All RGBWS operations are performed using 64-bit floating point arithmetics and a careful implementation to minimize roundoff errors. You can think of the RGBWS as if it were an ideal monitor able to represent 10
15 different hues for each color channel. That is certainly larger than the human vision's gamut

If you process your images in 32-bit floating point format (10
7 discrete pixel sample values), you'll never get any posterization caused by color space transformations or separations, in practice, irrespective of the RGBWS parameters or the color space of the profile associated with the image. 32-bit floating point is the recommended format for non-HDR and moderately large HDR images in PixInsight.
The ICC profile associated with the image is critical if you work in 8-bit integer format. With 8-bit images, there will be posterization if you work with large spaces such as ProPhoto, Adobe RGB, or Wide Gamut RGB. You can get some posterization in 8-bit images even in the sRGB space. Working in wide gamut spaces, posterization can also happen in 16-bit integer format if you apply aggressive saturation enhancements. However, who works with 8-bit or 16-bit images, actually? In case you really need them, you can work in the 32-bit integer or 64-bit floating point formats in PixInsight (2
32 and 10
15 discrete pixel sample values, respectively), so this is not a practical problem.
Can it be compared to scRgb (ie same primaries as sRgb and broader range of possible values) ?
The default RGBWS mimics the sRGB space in PixInsight. The only reason for this is that in this way the results of PixInsight's RGB-to-Grayscale conversions are the same as in most imaging applications, including all competing astronomical image processing applications. In other words, this has been a practical choice to avoid problems. For deep-sky astronomical image processing, a better default option would be a uniform space where the three luminance coefficients are equal to 1/3.
The purpose of a separate RGBWS in PixInsight is to provide the maximum possible flexibility to the users. The RGBWS is fully configurable for this reason. For example, if you want to work in a coherent environment, where image processing and color management tasks use the same color space, you can copy the parameters of your ICC profile space to the RGBWS (just make sure that you use values relative to D50). However, note that this will lead to luminance/chrominance separations where the relative weights of individual RGB channels will be unrelated, in general, to the information contents of the image. For everything related to color theory, conversion formulas and color space parameters,
Bruce Lindbloom's website is an indispensable reference.