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

FB9853235: AttributedString needs the ability to set the color of links #287

Open
sindresorhus opened this issue Jan 20, 2022 · 0 comments

Comments

@sindresorhus
Copy link
Member

sindresorhus commented Jan 20, 2022

  • Date: 2022-01-21
  • Resolution: Open
  • Area: Foundation
  • OS: macOS 12.1
  • Type: Suggestion

Description

There's currently no way to change the color of a link in an AttributedString. Sometimes you want to use a link in a context where the default color is illegible. In my case, I’m displaying some text above the user’s wallpaper, which could be anything, and while the text is white, the link is blue and often becomes illegible. I would like to set the color to light blue. In other case, it might make sense to let the user choose the color.

Setting the .foregroundColor attribute on the same range as the link has no effect.

Files

Screen Shot 2022-01-22 at 10 47 53

Sample project.zip

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