A built-in sRGB ICC profile, for use as a PDF/A output intent.
PDF/A forbids device-dependent colour without an output intent: 1 0 0 rg on
its own says "as red as this device gets", which is not a colour anyone can
reproduce a decade later. An output intent names the colour space those
numbers are to be read in, and carries an ICC profile defining it.
That profile has to come from somewhere. Rather than depend on one being installed, or ship someone else's, Tincture builds a v2 matrix/TRC display profile describing sRGB (IEC 61966-2.1) from its published constants:
- the sRGB primaries, chromatically adapted to the D50 profile connection space — the same Bradford-adapted values every sRGB profile carries;
- the real sRGB tone curve, sampled at 1024 points, including its linear segment below 0.04045. A plain gamma 2.2 curve is the common shortcut and is measurably wrong in the shadows.
The three channel curves share one tag, which the format allows and which keeps the profile around 2.5 kB.
Tincture.Font.AFM aside, this is the only place in the library holding
numeric constants from an external specification, so they are written out in
full rather than folded into expressions.
Summary
Functions
The number of colour components, for the ICC stream's /N entry.
The identifier naming this colour space in an output intent.
The sRGB profile as an ICC binary.
Functions
@spec components() :: pos_integer()
The number of colour components, for the ICC stream's /N entry.
@spec output_condition_identifier() :: String.t()
The identifier naming this colour space in an output intent.
@spec srgb() :: binary()
The sRGB profile as an ICC binary.