Replies: 3 comments 6 replies
-
This sounds very interesting! |
Beta Was this translation helpful? Give feedback.
-
Since we support css syntax for colors I think we should extend it to support css color 4. |
Beta Was this translation helpful? Give feedback.
-
I created PR #79. But there were some problems. colorjs.io procedural api, which I decided to use, is defined solely as an ESM module so I needed to change tests configuration based on the official experimental jest documentation. In addition, the generated The final size of the On the bright side, CSS color 4 is supported and color interpolation now works somewhat more predictably, see below. And I addressed some edge cases such as interpolation from In addition, there should be some performance improvement when interpolating colors in a space other than sRGB. When calculating each interpolation point, the cached color conversion result from sRGB to the target space is used - with the current version of |
Beta Was this translation helpful? Give feedback.
-
MapLibre GL supports only color values (rgb/hsl etc) defined with commas, newer syntax, CSS Color 4 ready, without commas is not supported.
Paint style:
"fill-color": "hsl(0 0% 83%)"
in layers currently results in an error:layers[0].paint.fill-color: color expected, "hsl(0 0% 83%)" found
.Would it be possible to migrate from csscolorparser to more modern css-color parsing library, for example colorjs.io?
As a bonus, the color interpolation logic from the src/util/color_spaces.ts could be delegated to the said library.
Beta Was this translation helpful? Give feedback.
All reactions