I'd like to use a color from an hexa string such as "#FFFF0000"
to (say) change the background color of a Layout.
Color.HSVToColor
looks like a winner but it takes a float[]
as a parameter.
Am I any close to the solution at all?
androidcolorshex
I'd like to use a color from an hexa string such as "#FFFF0000"
to (say) change the background color of a Layout.
Color.HSVToColor
looks like a winner but it takes a float[]
as a parameter.
Am I any close to the solution at all?
Best Answer
Try
Color
class method:From Android documentation:
AndroidX: String.toColorInt()