title: How to interpolate between two colors?
body: <p>If I have two colors (like in a color object), and then I have a value from 0 to 1 indicating a percent. How can I get the color (in hex or rgb) in between the two given colors with respect to the percent value. For example</p>
  
  <p>If the value was 0, then I would get the color in the far left of the image, if the value was 1, then would get the value in the far right. If it was 0.5, then the color in the center. Etc...</p>
  
  <p>Does anyone know how to do this?</p>
  
  <p>Thanks</p>
  
  <p><a href="https://i.stack.imgur.com/h7JeD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h7JeD.png" alt="enter image description here"></a></p>