texel-org / color

modern color library for image processing and creative coding (oklab, xyz, p3, rec2020 + more)
MIT License
367 stars 7 forks source link

Serialization / Deserialization #6

Open mattdesl opened 1 month ago

mattdesl commented 1 month ago

An issue to track this feature. Achieving full CSS parity is a complex task and will likely remain out of scope (and I imagine the CSS spec will continue to grow in complexity, with things like relative colors, color modifiers, and calculation).

However, it would be nice to have a serializer/deserializer that achieves the following:

Although most of this is working already, the main thing is to figure out and perhaps refactor things to finish the last three tasks.

In addition to @texel/color, it would be nice to have @texel/css-color or something, that is able to parse and serialize strings with full CSS parity and keywords.