🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

TextFieldColors

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.

Source set: Common
public class TextFieldColors public constructor(
    public val focusedTextColor: Color,
    public val unfocusedTextColor: Color,
    public val disabledTextColor: Color,
    public val errorTextColor: Color,
    public val focusedContainerColor: Color,
    public val unfocusedContainerColor: Color,
    public val disabledContainerColor: Color,
    public val errorContainerColor: Color,
    public val cursorColor: Color,
    public val errorCursorColor: Color,
    public val textSelectionColors: TextSelectionColors,
    public val focusedIndicatorColor: Color,
    public val unfocusedIndicatorColor: Color,
    public val disabledIndicatorColor: Color,
    public val errorIndicatorColor: Color,
    public val focusedLeadingIconColor: Color,
    public val unfocusedLeadingIconColor: Color,
    public val disabledLeadingIconColor: Color,
    public val errorLeadingIconColor: Color,
    public val focusedTrailingIconColor: Color,
    public val unfocusedTrailingIconColor: Color,
    public val disabledTrailingIconColor: Color,
    public val errorTrailingIconColor: Color,
    public val focusedLabelColor: Color,
    public val unfocusedLabelColor: Color,
    public val disabledLabelColor: Color,
    public val errorLabelColor: Color,
    public val focusedPlaceholderColor: Color,
    public val unfocusedPlaceholderColor: Color,
    public val disabledPlaceholderColor: Color,
    public val errorPlaceholderColor: Color,
    public val focusedSupportingTextColor: Color,
    public val unfocusedSupportingTextColor: Color,
    public val disabledSupportingTextColor: Color,
    public val errorSupportingTextColor: Color,
    public val focusedPrefixColor: Color,
    public val unfocusedPrefixColor: Color,
    public val disabledPrefixColor: Color,
    public val errorPrefixColor: Color,
    public val focusedSuffixColor: Color,
    public val unfocusedSuffixColor: Color,
    public val disabledSuffixColor: Color,
    public 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

Functions

copy

Source set: Common
public 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”

leadingIconColor

Source set: Common
public fun leadingIconColor(enabled: Boolean, isError: Boolean, focused: Boolean): Color

Represents the color used for the leading icon of this text field.

Parameters

enabled whether the text field is enabled
isError whether the text field's current value is in error
focused whether the text field is in focus

trailingIconColor

Source set: Common
public fun trailingIconColor(enabled: Boolean, isError: Boolean, focused: Boolean): Color

Represents the color used for the trailing icon of this text field.

Parameters

enabled whether the text field is enabled
isError whether the text field's current value is in error
focused whether the text field is in focus

indicatorColor

Source set: Common
public fun indicatorColor(enabled: Boolean, isError: Boolean, focused: Boolean): Color

Represents the color used for the border indicator of this text field.

Parameters

enabled whether the text field is enabled
isError whether the text field's current value is in error
focused whether the text field is in focus

containerColor

Source set: Common
public fun containerColor(enabled: Boolean, isError: Boolean, focused: Boolean): Color

Represents the container color for this text field.

Parameters

enabled whether the text field is enabled
isError whether the text field's current value is in error
focused whether the text field is in focus

placeholderColor

Source set: Common
public fun placeholderColor(enabled: Boolean, isError: Boolean, focused: Boolean): Color

Represents the color used for the placeholder of this text field.

Parameters

enabled whether the text field is enabled
isError whether the text field's current value is in error
focused whether the text field is in focus

labelColor

Source set: Common
public fun labelColor(enabled: Boolean, isError: Boolean, focused: Boolean): Color

Represents the color used for the label of this text field.

Parameters

enabled whether the text field is enabled
isError whether the text field's current value is in error
focused whether the text field is in focus

textColor

Source set: Common
public fun textColor(enabled: Boolean, isError: Boolean, focused: Boolean): Color

Represents the color used for the input field of this text field.

Parameters

enabled whether the text field is enabled
isError whether the text field's current value is in error
focused whether the text field is in focus

supportingTextColor

Source set: Common
public fun supportingTextColor(enabled: Boolean, isError: Boolean, focused: Boolean): Color

Represents the colors used for the supporting text of this text field.

Parameters

enabled whether the text field is enabled
isError whether the text field's current value is in error
focused whether the text field is in focus

prefixColor

Source set: Common
public fun prefixColor(enabled: Boolean, isError: Boolean, focused: Boolean): Color

Represents the color used for the prefix of this text field.

Parameters

enabled whether the text field is enabled
isError whether the text field's current value is in error
focused whether the text field is in focus

suffixColor

Source set: Common
public fun suffixColor(enabled: Boolean, isError: Boolean, focused: Boolean): Color

Represents the color used for the suffix of this text field.

Parameters

enabled whether the text field is enabled
isError whether the text field's current value is in error
focused whether the text field is in focus

cursorColor

Source set: Common
public fun cursorColor(isError: Boolean): Color

Represents the color used for the cursor of this text field.

Parameters

isError whether the text field's current value is in error

hashCode

Source set: Common
override fun hashCode(): Int

Content updated: