Template:Weather box/colt/sandbox

font-size:85%

The Template:Weather_box/colt makes temperature ("t") background colors. It is an alternative to Template:Weather box/colpastel, which uses lighter shades of color.

Performance considerations
Template:Weather_box/colt has been optimized to handle a range of values which are changed into color codes by using a  function, with 47 branches, ordered by expected frequency. It can assign colors to temperatures in Celsius at over 460 numbers per second, or 9x faster than encoding color settings as 3-part hexadecimal conversions of temperatures. The 47 branches split the overall range into 3-unit brackets, rather than using a precise spectrum of hundreds of shades of color; however, in practice, the 47 possible shades provide enough contrast to emphasize low versus high temperatures.