Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FB13807436: Expose the underlying color of a view's tint #529

Open
samhenrigold opened this issue May 23, 2024 · 0 comments
Open

FB13807436: Expose the underlying color of a view's tint #529

samhenrigold opened this issue May 23, 2024 · 0 comments

Comments

@samhenrigold
Copy link

samhenrigold commented May 23, 2024

  • Date: 2024-05-23
  • Resolution: Open
  • Area: SwiftUI
  • OS: iOS
  • Type: Suggestion

Description

In this example, I would like some way for TintedCircle to get the underlying orange color:

struct TintedCircle: View {
    var body: some View {
        Circle()
            .fill(.tint)
    }
}

...

struct OtherView: View {
    var body: some View {
        TintedCircle()
            .tint(.orange)
    }
}

This is an important use case for doing color calculations, like checking perceived lightness for accessibility adjustments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant