library / org.akop.kotx.ext.basic / kotlin.String / toColorIntOrNull

toColorIntOrNull

fun String.toColorIntOrNull(): Int?

Uses Color.parseColor to convert string representation of a color to integer, or null if string can't be parsed.