[argyllcms] Re: Custom Illuminant

  • From: <robert@xxxxxxxxxxxxxxxxxx>
  • To: <argyllcms@xxxxxxxxxxxxx>
  • Date: Fri, 11 Jul 2014 18:42:23 +0100

Hi Graeme,

I would like to make sure I understand what is happening when using -g with
colprof.  Here is what I think happens (I'll only cover Perceptual):

The -g flag only affects the Perceptual B2A table (in order for the
Perceptual B2A0 table to be generated by colprof, the -s flag is also

-g uses a gamut file which is produced either from tiffgamut (from a set of
images), or iccgamut (from an icc profile). I'll refer to this gamut as the
Custom Gamut, or CG.

If -g is not used, the Perceptual mapping is from the gamut of the source
profile (which I will call SG) to the gamut of the destination profile
(which I'll call DG).  The B2A0 table, which is responsible for the
Perceptual mapping, effectively 'squeezes' the whole of SG into DG.  All of
the colors that were present in SG will be remapped to new colors in DG,
even if none of the colors in SG were outside of the DG gamut (the effect of
the 'squeeze').

The effect of using -g is to create a new gamut which is the union of DG and
CG (which I will call UG).

The B2A0 table now 'does' the following:
- Colors that are outside of UG (but within SG) are effectively mapped to UG
using a Relative Colorimetric mapping.
- The table then does a Perceptual mapping from UG to DG.
(I assume that the two steps above are combined into one, seeing as how
there's only one mapping).

The effect is similar to doing a Relative Colorimetric mapping to a working
space a bit larger than DG followed by a Perceptual mapping to DG. However
it is potentially better because it can be controlled more precisely: the
size and shape of UG can be closely matched to the size and shape of the
union of DG and of an individual image, if this sort of precision is

The reason for this sort of approach is to attempt to reduce the
desaturation that can be the result of a Perceptual mapping from a large
color space to a smaller one.  (It is also applicable to Saturation

I would very much appreciate it if you would confirm if this is essentially
correct (or correct me if I'm wrong).

Many thanks


Other related posts: