Skip to content

Instantly share code, notes, and snippets.

@karangoel16
karangoel16 / colorUtils.kt
Last active October 15, 2022 02:57
ColorWithTransparency
fun String.toTransparentColor(num: Int): String {
return "#" + when (num) {
100 -> "FF"
99 -> "FC"
98 -> "FA"
97 -> "F7"
96 -> "F5"
95 -> "F2"
94 -> "F0"