How to change the color? | SoloLearn: Learn to code for FREE!


How to change the color?

Hi,friends! Tell me please, how I can make the sun blink with different shades of yellow, orange and red, I work only in html so far, I don’t know CSS yet. This is my first serious animated work, if you want you can support me with like! Thank you all for your attention and color recommendation.

5/29/2020 10:50:58 PM

✨🥇Blokhin Roman🥇✨

8 Answers

New Answer


Tom Joney (TheCoder) Yeah. Somehow Blokhin Roman I don't think it is possible to smoothly transition between colors without JavaScript but to animate an attribute the syntax is something like this. <animate attributeName="fill" from="yellow" to="red" dur="1s" fill="freeze" repeatCount="indefinite"/>


Blokhin Roman here is a code similar to what Ore Adeleye has explained using SVG value instead of the from to method btw Ore the transition is not as spikie as the from to method ...


Tom Joney (TheCoder) That is not HTML. It is SVG an XML-based vector graphics format.


BroFar , thanks a lot, good solution


Ore Adeleye, BroFar, Tom Joney (TheCoder) , I finalized and made more interesting)) Thank you


Ore Adeleye , thanks, it helped me very much)


Tom Joney (TheCoder) , everything worked out without CSS


@Ore Adeleye Do you understand what he's asking? I'm not entirely sure what he is asking - so I may have gotten confused.