Skip to content

Instantly share code, notes, and snippets.

@burntcookie90
Created April 19, 2015 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save burntcookie90/066e3b4293d8edf91994 to your computer and use it in GitHub Desktop.
Save burntcookie90/066e3b4293d8edf91994 to your computer and use it in GitHub Desktop.
fun expandColor(colorString : String) : String {
return if (colorString.length() <= 4) {
"${colorString[0]}${colorString[1]}${colorString[1]}${colorString[2]}${colorString[2]}${colorString[3]}${colorString[3]}"
}
else {
colorString
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment