https://kotlinlang.org logo
#compose
Title
# compose
a

Archie

10/05/2020, 11:09 AM
Text
composable when not placed in a
Surface
seem to not apply
Material Theme
correctly. So when I do:
Copy code
Column {
    Text()  // This text color is black in both light and dark theme
}
It seems that
ContentAmbientColor
is not properly set for
onBackgroundColor
(composables not part of a surface). Its really hard to trace what exactly is the problem though, as routing to sources in the IDE is currently broken.
l

Louis Pullen-Freilich [G]

10/05/2020, 12:12 PM
Your top level component should typically be a
Surface
, a
Scaffold
(which internally contains a
Surface
), or some other component that sets content color for you. It is the responsibility of the component that provides the background to also set content color.
a

Archie

10/05/2020, 1:01 PM
hmmm that make sense... kinda forgot about scaffold for while there..