Input string to Color conversion

Right now I have it set up so that the player can input a string and if it matches an default color, an object changes to that string. However, is there a way I could simplify my code and do something like (pseudocode)-

var INPUT : string = "blue";

renderer.material.color = Color.INPUT;

instead of

var INPUT : string = "blue";

if(INPUT=="blue"){
     renderer.material.color = Color.blue;
}
else if(INPUT=="red"){
     renderer.material.color = Color.red;
}
etc...

Use a dictionary.

var colors = new Dictionary.<String, Color>();
colors["blue"] = Color.blue; // and so on

Then you can do

if (colors.ContainsKey(input)) {
	renderer.material.color = colors[input];
}