material-components / material-components-android

Modular and customizable Material Design UI components for Android
Apache License 2.0
16.11k stars 3.04k forks source link

[MaterialSwitch] The switch icon has the incorrect color when the monochrome theme is applied #3620

Open fsgjlp opened 9 months ago

fsgjlp commented 9 months ago

Description: The switch icon has the incorrect color when the monochrome theme is applied. Everything works fine with other themes.

1

Minimal sample app repro: Catalog

Android API version: 14

Material Library version: 1.11.0-alpha03

Device: Virtual Device

hunterstich commented 9 months ago

Hey @fsgjlp,

Thanks for filing an issue! I see the same thing. It looks like our component is using the correct color attributes as defined on material.io. I'll take this to design and see how this should be addressed. Great catch!

hunterstich commented 9 months ago

Hey @fsgjlp,

I spoke with design who agree the icon needs to have a different color mapping. It sounds like they are leaning towards making the icon tint colorPrimary.

I'm looking at whether we want to wait until design makes the update and we get the fix through tokens or if we should make a temporary fix for the time being. I'll get back to you soon.

bubbleguuum commented 9 months ago

For info, there is a same issue if using the Color library to generate theme colors. Some input color seeds produce a check mark colored improperly.

bubbleguuum commented 3 months ago

Still a problem in latest git as of the date of this post. Also see: https://github.com/material-components/material-components-android/issues/3535