facelessuser / ColorHelper

Sublime plugin that provides helpful color previews and tooltips
https://facelessuser.github.io/ColorHelper/
MIT License
254 stars 30 forks source link

Update color syntax to support new Oklab and Oklch color format in CSS. #204

Closed facelessuser closed 2 years ago

facelessuser commented 2 years ago

There is still some discussion going on to iron out the new Oklab and Oklch color format over at the CSSWG, for instance:

If/when these issues above are decided, these changes will be handled via a new coloraide update, but there may be some normalization of colors stored in palettes that must be applied after the upgrade. These changes may come in one commit or many, depending on how long all these issues take to get formalized.

Just want to have an issue open to track this work.

facelessuser commented 2 years ago

We are officially adding this syntax.

With that said, I envision there will be an update in the future as CSS plans to make percentages optional for lightness, but also optional for chroma, a, and b. Ranges sound like they will encompass Display-P3 (roughly). Such changes will not invalidate our current syntax, so it is fine to go ahead and add it. In the future, it should only enhance the syntax.

These changes may at some future point come over to the color() format as there is talk to make all colors representable in the color() format. This is something we already do, but it is possible that some of our conventions may have to change.