title: Programmatic gradient stops with Javascript
body: <p>Working with Javascript (jQuery), given 2 color values (<code>2033ff</code> and <code>3300a0</code> for example) how can I determine certain gradient stops between them?</p>
  
  <p>Reason being is, I intend on using an array of color values:</p>
  
  <pre><code>    0 =&gt; '000000'
   8400 =&gt; 'f0ff00'
  44000 =&gt; '2033ff'
  68400 =&gt; '3300a0'
  </code></pre>
  
  <p>There being 86400 seconds in a day, 12:00AM maps to 0, and 11:59PM maps to 86399. As time passes, the background color of a specified element changes to the appropriate color in gradient list via <code>window.setInterval(function(e){ ... }, 1000)</code>. For example <code>2:32:11PM = 52331</code>, which from the example would be somewhere between <code>2033ff</code> and <code>3300a0</code>.</p>
  
  <p>I don't need to populate the array with the values (unless that would be easier) but instead use the index and value as references.</p>