Jetpack compose obtenir du code hexadécimal de la couleur
private fun Color.toHexCode(): String {
val red = this.red * 255
val green = this.green * 255
val blue = this.blue * 255
return String.format("#%02x%02x%02x", red.toInt(), green.toInt(), blue.toInt())
}
Now you can do this with your color:
color.toHexCode() and you'll have the hex code :)
Tender Turtle