Updated on 2026-08-14

This commit is contained in:
Tangem 2022-04-09 14:25:04 +03:00
parent e90cd6d727
commit cf2b5f7913
2 changed files with 7 additions and 3 deletions

View file

@ -10,7 +10,11 @@ import androidx.core.graphics.red
/**
[REDACTED_AUTHOR]
*/
fun Color.argb(): Int {
fun Color.toAndroidGraphicsColor(): Int {
val argb = this.toArgb()
return android.graphics.Color.argb(argb.alpha, argb.red, argb.green, argb.blue)
}
fun Color.parse(hexColor: String): Color {
return Color(hexColor.removePrefix("#").toInt(16))
}