Skip to content

Container inside Card not same surface color #105

Closed Answered by rydmike
abibiano asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @abibiano thanks for the question and for posting it directly here. It is a good question about Material 3 in general that I think other devs will face at some point too.

Yes what you describe is indeed the case, but only when useMaterial3 is set to true. This is because Card uses elevation tint and defaults to elevation 1.

Elevation "tint" is a new concept in Material 3 design, where surfaces with higher elevation get an increasing mix of colorScheme.primary mixed into the surface color. The higher the elevation (to a certain point) the higher the mix. Actually the mix color is colorScheme.surfaceTint, but it in turn defaults to colorScheme.primary here in SDK, tint color can thus als…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@abibiano
Comment options

Answer selected by rydmike
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question This issue is a usage question and will be moved to the Discussions section.
2 participants