Name
SetLayerTint -- set layer tinting (V2.0)
Formerly known as
SetLayerLight (V1.5)

Synopsis
SetLayerTint(id, tintcolor, tintlevel)
Function
This function can be used to tint a layer or layer group with a specified color at a given level. This is useful if you want to lighten the layer or layer group (use #WHITE as tintcolor) or darken it (use #BLACK as tintcolor). Of course you can also use other colors. Level ranges from 0 to 255 where 0 means no tinting (layer default setting) and 255 means full tinting which will make the layer appear fully in the specified color.

Starting with Hollywood 2.0, tintlevel can also be a string containing a percent specification, e.g. "50%".

Starting with Hollywood 5.0, this function will simply install a filter of type Tint in the specified layer. See SetLayerFilter for details.

You need to enable layers before you can use this function. See Layers introduction for details.

Inputs
id
identifier of the layer or layer group to use
tintcolor
RGB color to use for tinting
tintlevel
tint level to apply (0 to 255 or percent specification)
Example
EnableLayers()
DisplayBrush(1, #CENTER, #CENTER)
SetLayerTint(1, #BLACK, 128)
The code above darkens layer 1 (= brush 1) with ratio 50% (= 128).

Show TOC