Perhaps we should have some kind of way to register a ColorSpace object and make it available to CSS.
I imagine it may need a worker of some sort, to separate its scope from JS APIs we don't want CSS colors to depend on,
and have some kind of registration function that is only exposed in that worker space.
In terms of namespace, I think it's fine if it's the same as colors generated through @color-profile (color(--colorspace ...coords)). E.g. we already have two ways to register custom properties (@property and CSS.registerProperty()), and that's fine. In fact, it could even be used to polyfill @color-profile!
Thoughts, @tabatkins ?
Perhaps we should have some kind of way to register a
ColorSpaceobject and make it available to CSS.I imagine it may need a worker of some sort, to separate its scope from JS APIs we don't want CSS colors to depend on,
and have some kind of registration function that is only exposed in that worker space.
In terms of namespace, I think it's fine if it's the same as colors generated through
@color-profile(color(--colorspace ...coords)). E.g. we already have two ways to register custom properties (@propertyandCSS.registerProperty()), and that's fine. In fact, it could even be used to polyfill@color-profile!Thoughts, @tabatkins ?