ChipColors

Class
Common
class ChipColors
constructor(
    val containerColor: Color,
    val labelColor: Color,
    val leadingIconContentColor: Color,
    val trailingIconContentColor: Color,
    val disabledContainerColor: Color,
    val disabledLabelColor: Color,
    val disabledLeadingIconContentColor: Color,
    val disabledTrailingIconContentColor: Color,
)

Represents the container and content colors used in a clickable chip in different states.

Parameters

containerColor the container color of this chip when enabled
labelColor the label color of this chip when enabled
leadingIconContentColor the color of this chip's start icon when enabled
trailingIconContentColor the color of this chip's end icon when enabled
disabledContainerColor the container color of this chip when not enabled
disabledLabelColor the label color of this chip when not enabled
disabledLeadingIconContentColor the color of this chip's start icon when not enabled
disabledTrailingIconContentColor the color of this chip's end icon when not enabled

Functions

fun copy(
        containerColor: Color = this.containerColor,
        labelColor: Color = this.labelColor,
        leadingIconContentColor: Color = this.leadingIconContentColor,
        trailingIconContentColor: Color = this.trailingIconContentColor,
        disabledContainerColor: Color = this.disabledContainerColor,
        disabledLabelColor: Color = this.disabledLabelColor,
        disabledLeadingIconContentColor: Color = this.disabledLeadingIconContentColor,
        disabledTrailingIconContentColor: Color = this.disabledTrailingIconContentColor,
    ) =
        ChipColors(
            containerColor.takeOrElse { this.containerColor },
            labelColor.takeOrElse { this.labelColor },
            leadingIconContentColor.takeOrElse { this.leadingIconContentColor },
            trailingIconContentColor.takeOrElse { this.trailingIconContentColor },
            disabledContainerColor.takeOrElse { this.disabledContainerColor },
            disabledLabelColor.takeOrElse { this.disabledLabelColor },
            disabledLeadingIconContentColor.takeOrElse { this.disabledLeadingIconContentColor },
            disabledTrailingIconContentColor.takeOrElse { this.disabledTrailingIconContentColor },
        )

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