TextInputLayout default error color on Android

Viewed 3131

Since it is not easy to customize the color of the error in a TextInputLayout, I decided to change my error colour to match the one used by default by TextInputLayout.

In the design guidelines I could not find the definition of the default colour.

Do you know where I can find it?

2 Answers

Update in 2020.

TextInputLayout error color can be acquired via:

ContextCompat.getColor(this, com.google.android.material.R.color.design_error)

But it is marked private and can be changed. Approximately color value is:

<color name="color_text_input_error_color">#E87850</color>
Related