title: Using a list element as color for addRectFilled
body: <p>The following code was created in JES and uses JES built-in functions: makeEmptyPicture(),requestInteger(),addRectFilled. Otherwise the code is self contained.
  It returns error "Last input is not a color".<br>
  c[n] seems to be the problem. 
  Could someone please explain why?</p>
  
  <pre><code>barChart=makeEmptyPicture(500,500)
  bars=[0]
  
  c = ["red","orange","yellow","green","blue","magenta","black","gray"]
  
  nbars=requestInteger("How many bars")
  for n in range(nbars):
    bars.append(requestInteger("Enter Bar Value"))
  
  for n in range(len(bars)):
    addRectFilled(barChart ,(30+n*30) , 500-bars[n] , 20 , bars[n] ,c[n])
  
  show(barChart)
  </code></pre>
  
  <p>Tried a variation:</p>
  
  <pre><code>addRectFilled(barChart ,(30+n*30) , 500-bars[n] , 20 , bars[n] ,c[2])
  </code></pre>
  
  <p>Throws the same error</p>
  
  <p>Cheers</p>
  
  <p>Paul Greenwood</p>