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

What is Framer? Join the Community
Return to index
Giles Perry
Posted Jul 07 - Read on Facebook

How come Screen.backgroundColor = new Color("#F3F4FA") throws an error?


Jorn van Dijk

Screen.backgroundColor = "#F3F4FA"

Andrew Nalband

Because you're trying to add a newly instantiated object to something that wants a string value. This will work:

magic = new Color("#F3F4FA")
Screen.backgroundColor = magic.color

Sigurd Tapio Mannsåker

This was a bug after the gradient update, but was fixed yesterday. Just go File > Update Framer Library and it'll work again.

Sigurd Tapio Mannsåker

Nothing wrong with passing Color objects to backgroundColor in principle :)

Andrew Nalband

That works! I stand corrected!

Andrew Nalband

I can't really figure out why you'd want to instantiate a new color object and immediately add it to the background color of the Screen.

Read the entire post on Facebook