title: How can I convert a color name to a 3 element RGB vector?
body: <p>In many MATLAB plotting functions, you can specify the color as either a string or as a 3 element vector that directly lists the red, green, and blue values.</p>
  
  <p>For instance, these two statements are equivalent:</p>
  
  <pre><code>plot(x, y, 'Color', 'r');
  plot(x, y, 'Color', [1 0 0]);
  </code></pre>
  
  <p>There are 8 colors that can be specified by a string value: <code>'r','g','b','c','m','y','k','w'</code>. Is there a MATLAB built-in function that converts these strings to an equivalent RGB vector?</p>