dotlottie-rs icon indicating copy to clipboard operation
dotlottie-rs copied to clipboard

Rust demo-player renders incorrect colors

Open rectalogic opened this issue 6 months ago • 1 comments

I modified the Rust demo-player to load this test.json fixture.

It renders colors like this:

Image

I then loaded test.json into the web playground editor and it renders colors like this:

Image

Looking at the JSON, the circles color is [1, 0.377, 0] so the web version seems to render the correct color.

So I'm wondering why the Rust player renders an incorrect color. It seems to be rendering something like [0, 0.377, 1] (interpreting the color as BGR instead of RGB?)

rectalogic avatar Jun 06 '25 20:06 rectalogic

@rectalogic Thanks again for catching this. I believe the issue is that the renderer enforces a specific color format for non-WASM targets, which should ideally be configurable. I’ll include a fix for this in the next release.

https://github.com/LottieFiles/dotlottie-rs/blob/main/dotlottie-rs/src/lottie_renderer/mod.rs#L563

theashraf avatar Jun 07 '25 06:06 theashraf