SyntaxFix
Write A Post
Hire A Developer
Questions
The real answer is to use:
Color.parseColor(myPassedColor) in Android, myPassedColor being the hex value like #000 or #000000 or #00000000.
Color.parseColor(myPassedColor)
myPassedColor
hex
#000
#000000
#00000000
However, this function does not support shorthand hex values such as #000.