-
Notifications
You must be signed in to change notification settings - Fork 748
Closed
Labels
Description
All predefined color spaces are RGB. In prose and sample code, their transfer function into linear-light components is described quite differently, although it could be stated in a single formula with up to four parameters specific to the color space (of which only gamma γ is frequently mentioned). Can we use this abstraction – or a similar one – in the spec and leave optimization up to implementers?
c = (C < β × δ)
? C ÷ δ
: ((C − 1) ÷ α + 1) ^ γ
;
C = (c > β)
? α × c ^ γ⁻¹ − α + 1
: c × δ
;
Color Space | α = a + 1 | β = K₀/φ | γ | δ = φ |
---|---|---|---|---|
Rec. 2020 | ~1.099297 | ~0.018054 | 2.4 = 12/5 | 4.5 = 9/2 |
sRGB, P3 | 1.055 | 0.0031308 | 2.4 = 12/5 | 12.92 = 323/25 |
ProPhoto, ROMM | 1 | 0.001953 | 1.8 = 9/5 | 16 |
Adobe 1998 | 1 | 0 | 563/256 ≈ 2.2 | (1) |