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

Make highlight text colour respect the the rather than M3 default #4371

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicbell
Copy link

@nicbell nicbell commented Nov 8, 2024

Thanks for starting a pull request on Material Components!

Currently when you set your the primary colors like this:

        <item name="colorPrimary">@color/myColorPrimary</item>
        <item name="colorOnPrimary">@color/myColorOnPrimary</item>
        <item name="colorPrimaryContainer">@color/myColorPrimaryContainer</item>
        <item name="colorOnPrimaryContainer">@color/myColorOnPrimaryContainer</item>

The primary color changes for most M3 views. One thing that glaringly doesn't change is the text highlight color as it hard-code to @color/m3_sys_color_light_primary rather than pointing at a theme token such as ?colorPrimary.

In my app my primary color is blue but the text is highlighting in a shade of purple.

Before:

image

After:

image

Don't forget:

  • Identify the component the PR relates to in brackets in the title.
    [Buttons] Updated documentation
  • Link to GitHub issues it solves. closes #1234
  • Sign the CLA bot. You can do this once the pull request is opened.

Contributing
has more information and tips for a great pull request.

@nicbell
Copy link
Author

nicbell commented Nov 8, 2024

Ah I can see it was raised before. It's a strange to mix theme tokens and direct references to Material values.

#2452
#2808

@kendrickumstattd kendrickumstattd self-assigned this Nov 12, 2024
@kendrickumstattd kendrickumstattd added the Reviewing Internally An internal change has been created and sent for review. label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewing Internally An internal change has been created and sent for review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants