Modül:WeatherBoxColors
w = {};
math_mod = require( 'Module:Math' );
function hex( value ) return string. format("%02X", value)
end
function format_line( background, text_color ) return table. concat( {"background: #", background, "; color:#", text_color, ";"} );
end
function range_pos( value, start, stop ) if start < stop then if value < start then return 0; elseif value > stop then return 1; else return (value - start) / (stop - start); end else if value < stop then return 1; elseif value > start then return 0; else return (start - value) / (start - stop); end end end function w.