Hi all. I'm currently working with Material3 Cards...
# compose
c
Hi all. I'm currently working with Material3 Cards. I can't manage to set card background to plain white, if I have an elevation >0. I understand that theres a dynamic "darkening" with increasing elevation, but I don't want that in my case. I know that I can set a custom color using
CardDefaults.cardColor(containerColor = ...)
but the thing is: it cannot be the exact same color representation as my Surface color (which is already #FFFFFFFF). If I set either to #FFFFFFFE it's working fine, but I don't like it. Without further research I believe that matching colors (in tone, not just refs) lead to that elevation-overlaying behavior. Is there a way around I'm not aware of?
j
No, the way you've done it is the way to do it. Individual tonal values are not easily exposed at this time.
c
If that’s the solution I want the issue back! 😆 No, thank you. What I’m trying to achieve seems uncommon and it’s not material3-esque, so I’m fine for now. ✌️