I mean something like:
Error!
No this is not possible you have to specify that in your layout. But you can put the color in your colors.xml.
colors.xml
#abc123
your_layout.xml