title: How can I convert a string into a TColor Value?
body: <p>I am creating a Delphi form and want to assign background color to it on run time. This code:</p>
  
  <pre><code>Form1.Color := clSkyBlue; 
  </code></pre>
  
  <p>works well. My problem is that I have stored the color name in a table as a string. So, when I fetch the color name from the table and assign it to <code>Form1.Color</code>, the above statement becomes:</p>
  
  <pre><code>var
    ColorName: string;
  ....
  Form1.Color := ColorName;
  </code></pre>
  
  <p>and this results in a compile time error.</p>
  
  <p>How can I convert a string to a <code>TColor</code> value?</p>