TopAppBarColors

@Stable
class TopAppBarColors(val containerColor: Color, val scrolledContainerColor: Color, val navigationIconContentColor: Color, val titleContentColor: Color, val actionIconContentColor: Color)

Represents the colors used by a top app bar in different states. This implementation animates the container color according to the top app bar scroll state. It does not animate the leading, headline, or trailing colors.

Parameters

containerColor

the color used for the background of this BottomAppBar. Use Color.Transparent to have no color.

scrolledContainerColor

the container color when content is scrolled behind it

navigationIconContentColor

the content color used for the navigation icon

titleContentColor

the content color used for the title

actionIconContentColor

the content color used for actions

Constructors

Link copied to clipboard
constructor(containerColor: Color, scrolledContainerColor: Color, navigationIconContentColor: Color, titleContentColor: Color, actionIconContentColor: Color)

create an instance with arbitrary colors, see TopAppBarColors for a factory method using the default material3 spec

Properties

Link copied to clipboard
Link copied to clipboard
val containerColor: Color
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copy(containerColor: Color = this.containerColor, scrolledContainerColor: Color = this.scrolledContainerColor, navigationIconContentColor: Color = this.navigationIconContentColor, titleContentColor: Color = this.titleContentColor, actionIconContentColor: Color = this.actionIconContentColor): TopAppBarColors

Returns a copy of this TopAppBarColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int