Skip to content

Instantly share code, notes, and snippets.

@shakir915
Created April 19, 2019 17:34
Show Gist options
  • Save shakir915/998cbf1ee088a8b3ca2fccdf49e5a471 to your computer and use it in GitHub Desktop.
Save shakir915/998cbf1ee088a8b3ca2fccdf49e5a471 to your computer and use it in GitHub Desktop.
convert js color array to kotlin
if (true) {
var s = ""
var longS = ""
ssss.split(",").forEach {
val iS = it.substringAfter("\"").substringBefore("\"")
if (iS.contains("#")) {
s = s + "\"" + iS + "\","
} else {
s = s.removeSuffix(",") + ")),"
Log.d("::::", " $s ")
longS = longS + s
s = """GradientS("$iS", arrayOf("""
}
GradientS("Blu", arrayOf("#00416A", "#E4E5E6"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment