Added a utility function to generate a color from a string