The replacement library from https://colorjs.io/ is much, much larger but I think we can develop a custom build that uses treeshaking to whittle the code down to the bits that we need. @linonetwo does that sound feasible?
I intend the explore further improvements but I wanted to start by establishing a library that can do modern P3 and OKLCH colour calculations.