title: how to calculate gradient color by percent
body: <p>I have a float score, which is 0 to 1</p>
  
  <p>I need translate this score to color, </p>
  
  <p>0 is green</p>
  
  <p>1 is red</p>
  
  <p>0.5 should at the middle of green to red gradient color</p>
  
  <p>and so on</p>
  
  <p>how to write this? I have no idea.</p>