API reference

SurfaceColors Class

Paired container and content colors for Surface.
Surface draws SurfaceColors.container behind its content and publishes SurfaceColors.content to descendants through LocalContentColor and LocalContentColors, so Text and Icon inside it resolve a legible color without being passed one. The two travel together for that reason: copying SurfaceColors.container on its own leaves descendants with the foreground colors of the container it replaced.
SurfaceDefaults.Colors supplies the themed pair.

Signature

@Immutable data class SurfaceColors(val container: BrushSpec, val content: ContentColors)

Constructors

SurfaceColors ( container , content )
Signature
constructor(container: BrushSpec, content: ContentColors)
Parameters
container: BrushSpec  brush drawn behind the surface content
content: ContentColors  semantic primary, secondary, and icon colors provided to descendants
Returns
SurfaceColors

Properties

container : BrushSpec
[Get]
brush drawn behind the surface content
Signature
val container: BrushSpec
content : ContentColors
[Get]
semantic primary, secondary, and icon colors provided to descendants
Signature
val content: ContentColors