It is not the colorString
that's giving the error, but this
colors[i] = Color.parseColor(str);
^^^^^^^^
Because the Color#parseColor returns an int
and not a Color
object.
Hence, the error that int
(return type of parseColor()
) cannot be converted to Color
.