TextFieldColors

@Immutable
class TextFieldColors(val focusedTextColor: Color, val unfocusedTextColor: Color, val disabledTextColor: Color, val errorTextColor: Color, val focusedContainerColor: Color, val unfocusedContainerColor: Color, val disabledContainerColor: Color, val errorContainerColor: Color, val cursorColor: Color, val errorCursorColor: Color, val textSelectionColors: TextSelectionColors, val focusedIndicatorColor: Color, val unfocusedIndicatorColor: Color, val disabledIndicatorColor: Color, val errorIndicatorColor: Color, val focusedLeadingIconColor: Color, val unfocusedLeadingIconColor: Color, val disabledLeadingIconColor: Color, val errorLeadingIconColor: Color, val focusedTrailingIconColor: Color, val unfocusedTrailingIconColor: Color, val disabledTrailingIconColor: Color, val errorTrailingIconColor: Color, val focusedLabelColor: Color, val unfocusedLabelColor: Color, val disabledLabelColor: Color, val errorLabelColor: Color, val focusedPlaceholderColor: Color, val unfocusedPlaceholderColor: Color, val disabledPlaceholderColor: Color, val errorPlaceholderColor: Color, val focusedSupportingTextColor: Color, val unfocusedSupportingTextColor: Color, val disabledSupportingTextColor: Color, val errorSupportingTextColor: Color, val focusedPrefixColor: Color, val unfocusedPrefixColor: Color, val disabledPrefixColor: Color, val errorPrefixColor: Color, val focusedSuffixColor: Color, val unfocusedSuffixColor: Color, val disabledSuffixColor: Color, val errorSuffixColor: Color)

Represents the colors of the input text, container, and content (including label, placeholder, leading and trailing icons) used in a text field in different states.

Parameters

focusedTextColor

the color used for the input text of this text field when focused

unfocusedTextColor

the color used for the input text of this text field when not focused

disabledTextColor

the color used for the input text of this text field when disabled

errorTextColor

the color used for the input text of this text field when in error state

focusedContainerColor

the container color for this text field when focused

unfocusedContainerColor

the container color for this text field when not focused

disabledContainerColor

the container color for this text field when disabled

errorContainerColor

the container color for this text field when in error state

cursorColor

the cursor color for this text field

errorCursorColor

the cursor color for this text field when in error state

textSelectionColors

the colors used when the input text of this text field is selected

focusedIndicatorColor

the indicator color for this text field when focused

unfocusedIndicatorColor

the indicator color for this text field when not focused

disabledIndicatorColor

the indicator color for this text field when disabled

errorIndicatorColor

the indicator color for this text field when in error state

focusedLeadingIconColor

the leading icon color for this text field when focused

unfocusedLeadingIconColor

the leading icon color for this text field when not focused

disabledLeadingIconColor

the leading icon color for this text field when disabled

errorLeadingIconColor

the leading icon color for this text field when in error state

focusedTrailingIconColor

the trailing icon color for this text field when focused

unfocusedTrailingIconColor

the trailing icon color for this text field when not focused

disabledTrailingIconColor

the trailing icon color for this text field when disabled

errorTrailingIconColor

the trailing icon color for this text field when in error state

focusedLabelColor

the label color for this text field when focused

unfocusedLabelColor

the label color for this text field when not focused

disabledLabelColor

the label color for this text field when disabled

errorLabelColor

the label color for this text field when in error state

focusedPlaceholderColor

the placeholder color for this text field when focused

unfocusedPlaceholderColor

the placeholder color for this text field when not focused

disabledPlaceholderColor

the placeholder color for this text field when disabled

errorPlaceholderColor

the placeholder color for this text field when in error state

focusedSupportingTextColor

the supporting text color for this text field when focused

unfocusedSupportingTextColor

the supporting text color for this text field when not focused

disabledSupportingTextColor

the supporting text color for this text field when disabled

errorSupportingTextColor

the supporting text color for this text field when in error state

focusedPrefixColor

the prefix color for this text field when focused

unfocusedPrefixColor

the prefix color for this text field when not focused

disabledPrefixColor

the prefix color for this text field when disabled

errorPrefixColor

the prefix color for this text field when in error state

focusedSuffixColor

the suffix color for this text field when focused

unfocusedSuffixColor

the suffix color for this text field when not focused

disabledSuffixColor

the suffix color for this text field when disabled

errorSuffixColor

the suffix color for this text field when in error state

Constructors

Link copied to clipboard
constructor(focusedTextColor: Color, unfocusedTextColor: Color, disabledTextColor: Color, errorTextColor: Color, focusedContainerColor: Color, unfocusedContainerColor: Color, disabledContainerColor: Color, errorContainerColor: Color, cursorColor: Color, errorCursorColor: Color, textSelectionColors: TextSelectionColors, focusedIndicatorColor: Color, unfocusedIndicatorColor: Color, disabledIndicatorColor: Color, errorIndicatorColor: Color, focusedLeadingIconColor: Color, unfocusedLeadingIconColor: Color, disabledLeadingIconColor: Color, errorLeadingIconColor: Color, focusedTrailingIconColor: Color, unfocusedTrailingIconColor: Color, disabledTrailingIconColor: Color, errorTrailingIconColor: Color, focusedLabelColor: Color, unfocusedLabelColor: Color, disabledLabelColor: Color, errorLabelColor: Color, focusedPlaceholderColor: Color, unfocusedPlaceholderColor: Color, disabledPlaceholderColor: Color, errorPlaceholderColor: Color, focusedSupportingTextColor: Color, unfocusedSupportingTextColor: Color, disabledSupportingTextColor: Color, errorSupportingTextColor: Color, focusedPrefixColor: Color, unfocusedPrefixColor: Color, disabledPrefixColor: Color, errorPrefixColor: Color, focusedSuffixColor: Color, unfocusedSuffixColor: Color, disabledSuffixColor: Color, errorSuffixColor: Color)

create an instance with arbitrary colors. See TextFieldDefaults.colors for the default colors used in TextField. See OutlinedTextFieldDefaults.colors for the default colors used in OutlinedTextField.

Properties

Link copied to clipboard
val cursorColor: Color
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val errorCursorColor: Color
Link copied to clipboard
Link copied to clipboard
val errorLabelColor: Color
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val errorPrefixColor: Color
Link copied to clipboard
val errorSuffixColor: Color
Link copied to clipboard
Link copied to clipboard
val errorTextColor: Color
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val focusedTextColor: Color
Link copied to clipboard
Link copied to clipboard
val textSelectionColors: TextSelectionColors
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copy(focusedTextColor: Color = this.focusedTextColor, unfocusedTextColor: Color = this.unfocusedTextColor, disabledTextColor: Color = this.disabledTextColor, errorTextColor: Color = this.errorTextColor, focusedContainerColor: Color = this.focusedContainerColor, unfocusedContainerColor: Color = this.unfocusedContainerColor, disabledContainerColor: Color = this.disabledContainerColor, errorContainerColor: Color = this.errorContainerColor, cursorColor: Color = this.cursorColor, errorCursorColor: Color = this.errorCursorColor, textSelectionColors: TextSelectionColors? = this.textSelectionColors, focusedIndicatorColor: Color = this.focusedIndicatorColor, unfocusedIndicatorColor: Color = this.unfocusedIndicatorColor, disabledIndicatorColor: Color = this.disabledIndicatorColor, errorIndicatorColor: Color = this.errorIndicatorColor, focusedLeadingIconColor: Color = this.focusedLeadingIconColor, unfocusedLeadingIconColor: Color = this.unfocusedLeadingIconColor, disabledLeadingIconColor: Color = this.disabledLeadingIconColor, errorLeadingIconColor: Color = this.errorLeadingIconColor, focusedTrailingIconColor: Color = this.focusedTrailingIconColor, unfocusedTrailingIconColor: Color = this.unfocusedTrailingIconColor, disabledTrailingIconColor: Color = this.disabledTrailingIconColor, errorTrailingIconColor: Color = this.errorTrailingIconColor, focusedLabelColor: Color = this.focusedLabelColor, unfocusedLabelColor: Color = this.unfocusedLabelColor, disabledLabelColor: Color = this.disabledLabelColor, errorLabelColor: Color = this.errorLabelColor, focusedPlaceholderColor: Color = this.focusedPlaceholderColor, unfocusedPlaceholderColor: Color = this.unfocusedPlaceholderColor, disabledPlaceholderColor: Color = this.disabledPlaceholderColor, errorPlaceholderColor: Color = this.errorPlaceholderColor, focusedSupportingTextColor: Color = this.focusedSupportingTextColor, unfocusedSupportingTextColor: Color = this.unfocusedSupportingTextColor, disabledSupportingTextColor: Color = this.disabledSupportingTextColor, errorSupportingTextColor: Color = this.errorSupportingTextColor, focusedPrefixColor: Color = this.focusedPrefixColor, unfocusedPrefixColor: Color = this.unfocusedPrefixColor, disabledPrefixColor: Color = this.disabledPrefixColor, errorPrefixColor: Color = this.errorPrefixColor, focusedSuffixColor: Color = this.focusedSuffixColor, unfocusedSuffixColor: Color = this.unfocusedSuffixColor, disabledSuffixColor: Color = this.disabledSuffixColor, errorSuffixColor: Color = this.errorSuffixColor): TextFieldColors

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”

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