Is there a way to parse a string to Color in Compo...
# compose
a
Is there a way to parse a string to Color in Compose? 🤔
p
Hi, what about:
Copy code
val color = Color(java.lang.Long.decode("0x4200FF00"))
val color3 = Color(java.lang.Long.decode("#4200FF00"))
val color2 = Color("4200FF00".toLong(radix = 16))
🙏 1
k
I found this
Copy code
val String.color
get() = Color(android.graphics.Color.parseColor(this))
from rajandev17/*Plasma*
328 Views