Skip to content

Commit

Permalink
Clip baked in to p3
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnw committed Mar 19, 2024
1 parent 7a93af8 commit 40d9fb8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/gamut-mapping/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 40d9fb8

Please sign in to comment.