Billy Newman
06/05/2023, 1:48 PMBilly Newman
06/05/2023, 1:48 PMSurface(color = Color.Black) {
Text(text = "Hello World)
}
Kirill Grouchnikov
06/05/2023, 1:56 PMText
take their colors from that theme. When you override the Surface
color somewhere in your hierarchy, you can’t expect everything “under” that node to somehow automatically adjust to that off-theme color.
You can set a dark-colors theme as a wrapper around your Surface
- which would then make everything in that sub-tree adopt the dark appearance. Or if you do something custom like this, you’ll need to also be explicitly custom in every child - which is your Text
Kirill Grouchnikov
06/05/2023, 1:58 PMKirill Grouchnikov
06/05/2023, 1:58 PMKirill Grouchnikov
06/05/2023, 1:59 PMKirill Grouchnikov
06/05/2023, 2:00 PMSurface.color
is exactly one of the RGBs in this when
block, you will get Color.Unspecified
which will then fall back to the theme color for your Text
Kirill Grouchnikov
06/05/2023, 2:01 PMonXYZ
colors from the theme, and not a dynamically generated value that is based on your black color for the surface.Billy Newman
06/05/2023, 2:01 PMBilly Newman
06/05/2023, 2:02 PM