Dark and Light mode color change #1825
Replies: 3 comments 4 replies
-
Since Lottie is primarily a series of I think the simplest approach would probably be to have two different Lottie assets -- one for light mode, one for dark mode, and dynamically use one of the other in your app. Doing this through a We don't currently have a simpler solution for this, unfortunately. Some approaches I could imagine include:
|
Beta Was this translation helpful? Give feedback.
-
Since it's using paths in my case inside svg.
Before After |
Beta Was this translation helpful? Give feedback.
-
for my black and white logo, |
Beta Was this translation helpful? Give feedback.
-
Hey all. Does anyone have experience working with Lottie in Dark and Light mode and changing the color in each mode in Lottie 3.5? I have tried using
ColorValueProvider
withAnimationKeypath
though it would require to know KeyPath name for each code in order to map.I have also used
ColorValueBlock
inColorValueProvider
but it just returns first match if we provide dynamic filters like**.Color
. It would nice to get allkeypath
s so colors can be mapped.Does anyone have worked with both mode and know how to change change colors dynamically without giving static keypath names?
Beta Was this translation helpful? Give feedback.
All reactions