Is there any way to generate a color from any String in Java / Android like an Encrypt / Hash function?
Example:
The String “Home” generates a color like “#FF1234”.
The String “Sky” generates a color like “#00CC33”
…
Without randomize. So, the system will always calculate the same colors for that strings
Thanks
EDIT: The Strings are freely defined by the user
the
String.hashCode()will return an int value, so then it’s just a matter of turning that into into a hex value.