toColorInt

@RequiresApi(value = 26)
inline fun Long.toColorInt(): Int(source)

Converts the specified color long to an ARGB color int.


Return a corresponding Int color of this String.

Supported formats are:

#RRGGBB
#AARRGGBB

The following names are also accepted: "red", "blue", "green", "black", "white", "gray", "cyan", "magenta", "yellow", "lightgray", "darkgray", "grey", "lightgrey", "darkgrey", "aqua", "fuchsia", "lime", "maroon", "navy", "olive", "purple", "silver", "teal".

Throws

if this String cannot be parsed.