与Javascript(jQuery)合作,给出了2个彩色值(2033ff
和3300a<0>/code>,例如),我如何确定它们之间的某些梯度。
正因为如此,我打算使用一系列彩色价值:
0 => 000000
8400 => f0ff00
44000 => 2033ff
68400 => 3300a0
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 window.setInterval(function(e){ ... }, 1000)
. For example 2:32:11PM = 52331
, which from the example would be somewhere between 2033ff
and 3300a0
.
我无需把阵列同价值观(除非更容易)相聚,而是将指数和价值作为参考。