Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Using a Gradient or Material As a Tint

Using a Gradient or Material As a Tint

Daily Coding Tip 157

Millie Sturgeon's avatar
Millie Sturgeon
Aug 16, 2022
∙ Paid

Share this post

Type Safely
Type Safely
Using a Gradient or Material As a Tint
Share
blue and pink light illustration
Photo by Gradienta on Unsplash

The .accentColor modifier has been deprecated, and in its place is a far more capable modifier called .tint. One version of it takes a Color, which is identical to .accentColor. The other one is generic, which makes it much more interesting:

@inlinable public func tint<S>(_ tint: S?) -> some View where S : ShapeStyle

Any type…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share