Correctly parse colours defined as "#..." or "#...."

The Android framework only understands colours defined as a hex string
of 6 or 8 characters, but not as hex strings of 3 or 4 characters. The
latter are however allowed to be used in Android apps, as AAPT does the
conversion at compile time. This makes sure we can handle all accepted
formats of colours.

Bug: 147374450
Test: RenderTests.testTypedValue updated
Change-Id: Ic5be0d7a92f6ae95ccfdea61789878a27db5b006
(cherry picked from commit a384318502d3773f1098aef6b6e14adc2c3e9f52)
4 files changed