This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
唐龍
Posted Jun 17 - Read on Facebook

Hello everyone, I ask:
framer how to do color conversion animation? I try to use between two layers of different colors to switch, but that I feel inconvenient. Is there like "Quartz Composer" that there is a "Color Transition" control nodes? I want to be one click to change the color of the animation. How to write the code?
Thank you! !

8 Comments

Jordan Robert Dobson

CSS styles will do it.

Jordan Robert Dobson

myLayer.style = { backgroundColor: "red", transition: "background-color 1s ease" }

Jordan Robert Dobson

If transition doesn't work you might need "-webkit-transition": "background 1s ease" instead.

I'm pretty sure this isn't hardware accelerated so be careful going this route.

唐龍

Jordan Robert Dobson 非常感谢!我这就去试试!❤️(Thank you very much! I'll go try it! ❤️)

Jordan Robert Dobson

我很乐意帮忙。

Krzysiek Podruczny

You can also try using hueRotate property: http://framerjs.com/docs/#layer.hueRotate

Jordan Robert Dobson

^ good idea

唐龍

Krzysiek Podruczny Thank you, really is a good method, but not easy to control the color I want, by the hue angle change or not so well controlled, or "Layer.style" meets my needs.

Read the entire post on Facebook