<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ControlWidgetTemplate/tint(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI21ControlWidgetTemplateP0D3KitE4tintyQrAA5ColorVSgF"
  },
  "title" : "tint(_:)"
}
-->

# tint(_:)

Sets the tint color within this control template.

```
@MainActor @preconcurrency func tint(_ tint: Color?) -> some ControlWidgetTemplate
```

## Parameters

`tint`

The tint [`Color`](/documentation/SwiftUI/Color) to apply.

## Discussion

Controls don’t respect the [`tint(_:)`](/documentation/SwiftUI/View/tint(_:)) modifier when applied to
control labels, nor do controls support arbitrary tint shape styles.
Instead, define a tint color for your control by applying this modifier
to its template:

```
struct GarageDoorOpener: ControlWidget {
    var body: some ControlWidgetConfiguration {
        StaticControlConfiguration(...) {
            ControlWidgetToggle(...) {
                Label(
                    $0 ? "Open" : "Closed",
                    systemImage: $0 ? "door.open" : "door.closed"
                )
            }
            .tint(.orange)
        }
    }
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)