The default error color is based on the colorError
attribute.
The current value in a light theme is:
<color name="design_default_color_error">#B00020</color>
If you want to use it in another attribute you can copy this value or you can use ?attr/colorError
. Example:
<item name="strokeColor">?attr/colorError</item>
If you want to get programmatically this value you can use:
MaterialColors.getColor(fab, R.attr.colorError)