---
title: opacity
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/graphicscontext/opacity
---

# opacity

The opacity of drawing operations in the context.

## Declaration

```swift
var opacity: Double { get set }
```

## Discussion

Discussion Set this value to affect the opacity of content that you subsequently draw into the context. Changing this value has no impact on the content you previously drew into the context.

## See Also

### Setting opacity and the blend mode

- [blendMode](swiftui/graphicscontext/blendmode-swift.property.md)
- [GraphicsContext.BlendMode](swiftui/graphicscontext/blendmode-swift.struct.md)
