lottie / lottie-spec

Lottie Animation format documentation and tools
https://lottie.github.io/lottie-spec/
Other
53 stars 14 forks source link

Specify behaviour for RGBA (4D) color properties #28

Open mbasaglia opened 6 months ago

mbasaglia commented 6 months ago

Currently lottie-web ignores the 4th component

fmalita commented 6 months ago

Since the data is already there, it seems reasonable to make use of it. Non-opaque colors are useful in general, and can also be more efficient to render than the group opacity alternative.

I wasn't sure how this would work for LottieWeb's SVG backend, but it looks like SVG 2 introduced the alpha-channel CSS form rgba() for fill and stroke, and that is now supported in all browsers. So it should be easy to update.

mbasaglia commented 6 months ago

SVG should also support #rrggbbaa