---
title: "tint(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/controlwidgettemplate/tint(_:)"
---

# tint(_:)

Sets the tint color within this control template.

## Declaration

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

```

## Parameters

- `tint`: The tint doc://com.apple.SwiftUI/documentation/SwiftUI/Color to apply.

## Discussion

Discussion Controls don’t respect the 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)         }     } }
