Function stringToColor

  • Converts a string to a color depending on the hash value of the string. So we get pseudo-randomized colors for different strings.

    Parameters

    • str: string

      The string to get a color for.

    Returns string

    A # leaded rgb hex color depending on the input string.