---
title: globalAlpha
framework: webkitjs
role: symbol
role_heading: Instance Property
path: webkitjs/canvasrenderingcontext2d/1631404-globalalpha
---

# globalAlpha

A floating-point number controlling the degree of opacity for all drawing operations.

## Declaration

```data
attribute unrestricted float globalAlpha;
```

## Discussion

Discussion Set the globalAlpha to any value between 0 and 1, inclusive, to set the degree of opacity for all subsequent drawing operations, with 0 being completely transparent and 1 being completely opaque. Any pixels drawn subsequently have their alpha channel value multiplied by the globalAlpha value.

## See Also

### Compositing

- [globalCompositeOperation](webkitjs/canvasrenderingcontext2d/1632770-globalcompositeoperation.md)
