Color.ICtCp
(Color v0.4.0)
Copy Markdown
ICtCp color space (ITU-R BT.2100).
ICtCp is the HDR/WCG color space used by Dolby Vision, HDR10+ and Rec. 2100. It operates on Rec. 2020 primaries with either the PQ (default) or HLG transfer function. Use PQ for cinema/OTT, HLG for broadcast.
The :transfer field selects the transfer function — :pq
(default) or :hlg.
PQ is an absolute transfer function: input 1.0 corresponds to
10,000 cd/m². Since our Color.XYZ uses Y = 1.0 for the reference
white, we scale by a :reference_luminance option (default
100 cd/m², matching SDR diffuse white) before encoding and
divide on the way back.
Summary
Types
An ITP (ICtCp) colour for HDR signals (Rec. 2100). i is intensity,
ct and cp are the tritan / protan chroma channels. The
:transfer field selects PQ (:pq, the default) or HLG (:hlg).
Functions
Converts CIE XYZ (D65) to ICtCp using the PQ transfer function.
Converts ICtCp to CIE XYZ (D65).
Types
@type t() :: %Color.ICtCp{ alpha: Color.Types.alpha(), cp: float() | nil, ct: float() | nil, i: float() | nil, transfer: :pq | :hlg }
An ITP (ICtCp) colour for HDR signals (Rec. 2100). i is intensity,
ct and cp are the tritan / protan chroma channels. The
:transfer field selects PQ (:pq, the default) or HLG (:hlg).
Functions
Converts CIE XYZ (D65) to ICtCp using the PQ transfer function.
Arguments
xyzis aColor.XYZstruct.
Returns
- A
Color.ICtCpstruct withtransfer: :pq.
Examples
iex> {:ok, ictcp} = Color.ICtCp.from_xyz(%Color.XYZ{x: 0.95047, y: 1.0, z: 1.08883, illuminant: :D65, observer_angle: 2})
iex> Float.round(ictcp.i, 3)
0.508
Converts ICtCp to CIE XYZ (D65).