Add a check on color format to avoid exceptions

When resolving a resource that can be a color or something else, check
whether the value starts with '#' before attempting to parse it as a
color. That will avoid unnecessary exceptions when the resource is not a
color.

Bug: 146040183
Test: existing tests
Change-Id: I7f5d23e50dd881939273e6bc28b61f4d9e45b872
1 file changed