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

# opacity

The degree of opacity in the color, given in the range 0 to 1.

## Declaration

```swift
var opacity: Float
```

## Discussion

Discussion A value of 0 means 100% transparency, while a value of 1 means 100% opacity.
