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

What is Framer? Join the Community
Return to index
Vicky Yang
Posted Mar 15 - Read on Facebook

Hi guys,
I'm having trouble randomising the colour of the letters on a click event. So far the background colour can be randomised.

I'm also hoping to center the letters, but again, couldn't get it to work.

Here is the file

Would love some help! Thanks in advance!


Jonas Treub

With the color property you can change text color:

Blaise DiPersia

There's got to be a better way, but put text inside of its own layer and use layer.centerY() for vertical centering. Then use style.textAlign ='center' for horizontal centering.

Vicky Yang

Thanks a lot guys!

Jonas Treub

There are comments in the code

Vicky Yang

OMG amazing! Thanks SO much! Made my day :D

Read the entire post on Facebook