Updated on 2026-08-14
This commit is contained in:
parent
e90cd6d727
commit
cf2b5f7913
2 changed files with 7 additions and 3 deletions
|
|
@ -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))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue