From 5ea4a279782c35dbcafde0f98a0f8f064cf2bd61 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 25 Jul 2024 12:30:40 +0200 Subject: [PATCH] Fix reverse HLG transform The +b needs to happen outside of the exp() call to be the reverse of the original HLG. --- css-color-hdr/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-color-hdr/Overview.bs b/css-color-hdr/Overview.bs index 8f317d81e6f..8c00dbd6712 100644 --- a/css-color-hdr/Overview.bs +++ b/css-color-hdr/Overview.bs @@ -578,7 +578,7 @@ Predefined color spaces for HDR: {#predefined-HDR} E = (Edash ** 2) / 3; } else { - E = Math.exp(((Edash - c) / a) + b) / 12; + E = (Math.exp((Edash - c) / a) + b) / 12; }