title: How does java.awt.Color.getColor(String colorName) work?
body: <p>I'm trying to get colors by name, and I came across <a href="https://stackoverflow.com/questions/2854043/converting-a-string-to-color-in-java">Converting a String to Color in Java</a>, which suggests using <code>java.awt.getColor</code>.</p>
  
  <p>I can't work out what to pass it as a string though. The following</p>
  
  <pre><code>System.out.println( java.awt.Color.getColor( "black", Color.red ) );
  </code></pre>
  
  <p>prints out</p>
  
  <blockquote>
    <p>java.awt.Color[r=255,g=0,b=0]</p>
  </blockquote>
  
  <p>i.e. it is going with the default color in there.</p>
  
  <p>I've put this in a text box, and tried alternative capitalisations etc. The docs aren't very helpful here. Can anyone suggest what magic strings to put in?</p>