Replies: 2 comments 1 reply
-
Hey @bit4us, you can achieve this with the current API and I will consider adding it as an option with the next major release, which I am planning to start soon. Check this demo to see how you can implement it without transition. Regarding the time in seconds for now you will need to divide the color time by the duration, and pass it as a fraction, like so: duration={150}
colors={[["#42b0f5", 60/150],["#2bb32b",30/150], ["#eeee60", 30/150], ["#ff4a2e"]]} |
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Please let me tell you that I love your work.
However for a project I'm working on, I'd be needing the possibility to set exact time when the color will change (without complicated calculations) and to have the option for no transition during color change (instant switch?).
More exactly, I'd like to be able to set timer colors like this:
duration={150}
colors={[["#42b0f5", 60],["#2bb32b",30], ["#eeee60", 30], ["#ff4a2e"]]}
or
duration={1350}
colors={[["#42b0f5", 1080],["#2bb32b",120], ["#eeee60", 120], ["#ff4a2e"]]}
As you can see in the examples I need to have the possibility to put in seconds instead of fraction when the color changes.
Do you think you can make it, or is it already available?
Beta Was this translation helpful? Give feedback.
All reactions