title: Change the Console.Foregroundcolor from a string
body: <p>I want to output the name of the color in the same color, and the color in question should be taken from user input. I could write something using if statements and naming all the colors, but this wouldn't be elegant enough.</p>
  
  <p>Is there a way to use switch, check for errors in the variable, if the input isn't a color give an error message and otherwise convert the variable to a color and use Console.Foregroundcolor = ConsoleColor.value of the variable?</p>
  
  <pre><code>static void Main()
      {
          Console.WriteLine("Name a color");
       string color = Console.ReadLine();
      }
  </code></pre>