From 40d9fb895f23f63abe4a25cd52967db879a66519 Mon Sep 17 00:00:00 2001 From: James Stuckey Weber Date: Tue, 19 Mar 2024 13:07:01 -0400 Subject: [PATCH] Clip baked in to p3 --- apps/gamut-mapping/methods.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/gamut-mapping/methods.js b/apps/gamut-mapping/methods.js index e91424551..c4a5faf4d 100644 --- a/apps/gamut-mapping/methods.js +++ b/apps/gamut-mapping/methods.js @@ -174,8 +174,9 @@ const methods = { // Attenuate the ab coordinate by alpha. return oklab.set({a: alpha * a, b: alpha * b}) // Implementation difference: The reference algorithm does not include a - // final clip, so some colors may be outside of `rec2020`. - .toGamut({method: "clip", space: "rec2020"}); + // final clip, so some resulting colors may be outside of `rec2020`, and + // here we clip to p3 for comparison with other methods. + .toGamut({method: "clip", space: "p3"}); }, }, "raytrace": {