Source set: Common
class SelectableChipColors(
val containerColor: Color,
val labelColor: Color,
val leadingIconColor: Color,
val trailingIconColor: Color,
val disabledContainerColor: Color,
val disabledLabelColor: Color,
val disabledLeadingIconColor: Color,
val disabledTrailingIconColor: Color,
val selectedContainerColor: Color,
val disabledSelectedContainerColor: Color,
val selectedLabelColor: Color,
val selectedLeadingIconColor: Color,
val selectedTrailingIconColor: Color,
)
Represents the container and content colors used in a selectable chip in different states.
Parameters
| containerColor | the container color of this chip when enabled |
| labelColor | the label color of this chip when enabled |
| leadingIconColor | the color of this chip's start icon when enabled |
| trailingIconColor | 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 |
| disabledLeadingIconColor | the color of this chip's start icon when not enabled |
| disabledTrailingIconColor | the color of this chip's end icon when not enabled |
| selectedContainerColor | the container color of this chip when selected and enabled |
| disabledSelectedContainerColor | the container color of this chip when selected and not enabled |
| selectedLabelColor | the label color of this chip when selected and enabled |
| selectedLeadingIconColor | the color of this chip's start icon when selected and enabled |
| selectedTrailingIconColor | the color of this chip's end icon when selected and enabled |
Functions
copy
fun copy(
containerColor: Color = this.containerColor,
labelColor: Color = this.labelColor,
leadingIconColor: Color = this.leadingIconColor,
trailingIconColor: Color = this.trailingIconColor,
disabledContainerColor: Color = this.disabledContainerColor,
disabledLabelColor: Color = this.disabledLabelColor,
disabledLeadingIconColor: Color = this.disabledLeadingIconColor,
disabledTrailingIconColor: Color = this.disabledTrailingIconColor,
selectedContainerColor: Color = this.selectedContainerColor,
disabledSelectedContainerColor: Color = this.disabledSelectedContainerColor,
selectedLabelColor: Color = this.selectedLabelColor,
selectedLeadingIconColor: Color = this.selectedLeadingIconColor,
selectedTrailingIconColor: Color = this.selectedTrailingIconColor,
) =
SelectableChipColors(
containerColor.takeOrElse { this.containerColor },
labelColor.takeOrElse { this.labelColor },
leadingIconColor.takeOrElse { this.leadingIconColor },
trailingIconColor.takeOrElse { this.trailingIconColor },
disabledContainerColor.takeOrElse { this.disabledContainerColor },
disabledLabelColor.takeOrElse { this.disabledLabelColor },
disabledLeadingIconColor.takeOrElse { this.disabledLeadingIconColor },
disabledTrailingIconColor.takeOrElse { this.disabledTrailingIconColor },
selectedContainerColor.takeOrElse { this.selectedContainerColor },
disabledSelectedContainerColor.takeOrElse { this.disabledSelectedContainerColor },
selectedLabelColor.takeOrElse { this.selectedLabelColor },
selectedLeadingIconColor.takeOrElse { this.selectedLeadingIconColor },
selectedTrailingIconColor.takeOrElse { this.selectedTrailingIconColor },
)
Returns a copy of this SelectableChipColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”