# NodeBox

Create visual output with Python programming code
Home Download Reference Tutorial Library Gallery About

# photobot.Layer.opacity()

## Syntax

    canvas.layers[i].opacity(a)

## Description

Sets the opacity of layer i, which is a value ranging between 0 and 100.

## Example

    photobot = ximport("photobot")
    canvas = photobot.canvas(100,100)
    canvas.layer("robot.jpg")
    canvas.layers[1].opacity(80)