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

What is Framer? Join the Community
Return to index
George Kedenburg III
Posted Aug 20 - Read on Facebook

✨~✨~ Magic Text ~✨~✨

Made this quick little demo on the way home the other day. It's just a text layer that responds to the image underneath it by changing its color and shadow.

I do this by writing the image to a canvas element, and then sampling the lightness value at multiple points on the layer. I average the lightness together and use that to determine what color the text should be and how much shadow there should be.

Hope it helps you build something awesome!

Play with it here: http://share.framerjs.com/e0yfu9p8j92n/

10 Comments

Jordan Robert Dobson

That's fun. Did you happen to use Marc Krenn's color thief module? Or do it manually?

Josh Peters

You're like...a wizard. :)

Marc Krenn

ha, that's cool!

Jorn van Dijk

On fire these days!

Ivan Voitenko

it's easy.

Agisilaos Tsaraboulidis

Cool stuff 😍😍😍

Peter Lada

Awesome

Eric Nakagawa

Do you sample the space immediately under the rectangle?

Yeseul lee

really nice👍🏻

Joon Won Lee

Great work!

Read the entire post on Facebook