Is there the recommended way to map/parse hexColor...
# compose
v
Is there the recommended way to map/parse hexColor: String to compose Color?
hex.removePrefix("#").toLong16()
?
e
.toULong(radix = 16)
s
e
but you probably want to check its length, because I imagine you want
#ffffff
to be white and not transparent
v
I wonder why there are no official support/recommendation
r
On Android you can use
android.graphics.Color.parseColor()
225 Views