How to script color overlay color?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
LJE
Posts: 5
Joined: Fri Aug 19, 2016 10:36 am

How to script color overlay color?

Post by LJE » Sat Aug 20, 2016 5:25 pm

I tried:

set coloroverlay of img "logo" to true
set coloroverlay of img "logo" to "255,255,255"

But nothing happens.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: How to script color overlay color?

Post by jmburnod » Sat Aug 20, 2016 5:57 pm

Hi,LJE
All graphic effects are arrays and you can set each key of this array

Code: Select all

set the colorOverlay["color"] of img "logo" to "255,0,0"
set the colorOverlay["opacity"] of img "logo" to 50
or

Code: Select all

  put 255 into tOverlayProp ["opacity"]
put "2,5,18" into tOverlayProp ["color"]
set the coloroverlay of img 1 to tOverlayProp
Best regards
Jean-Marc
https://alternatic.ch

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: How to script color overlay color?

Post by richmond62 » Sat Aug 20, 2016 7:46 pm

If you look up "overlay" in the in-built Dictionary everything is explained.

In fact, to save yourself quite a lot of time, try to make the in-built Dictionary your first stop every time you have a question :)
overlay.png
However, it is extremely important to be clear about what you are searching for:
underlay.jpg

Post Reply