String to color method