ವಿಷಯಕ್ಕೆ ಹೋಗು

ಟೆಂಪ್ಲೇಟು:Weather box/colgreen/doc

ವಿಕಿಪೀಡಿಯದಿಂದ, ಇದು ಮುಕ್ತ ಹಾಗೂ ಸ್ವತಂತ್ರ ವಿಶ್ವಕೋಶ

The Template:Weather box/colgreen makes rain (precipitation) background colors. It is an alternative to Template:Weather box/colp, which uses the standard colors.

mm of rain in a 30-day month
0369121518212427
30333639424548515457
60636669727578818487
90939699102105108111114117
120123126129132135138141144147
150153156159162165168171174177
180183186189192195198201204207
210213216219222225228231234237
240243246249252255258261264267
270273276279282285288291294297
300303306309312315318321324327
inches of rain in a 30-day month
0.00.10.20.30.40.50.60.70.80.9
1.01.11.21.31.41.51.61.71.81.9
2.02.12.22.32.42.52.62.72.82.9
3.03.13.23.33.43.53.63.73.83.9
4.04.14.24.34.44.54.64.74.84.9
5.05.15.25.35.45.55.65.75.85.9
6.06.16.26.36.46.56.66.76.86.9
7.07.17.27.37.47.57.67.77.87.9
8.08.18.28.38.48.58.68.78.88.9
9.09.19.29.39.49.59.69.79.89.9
10.010.110.210.310.410.510.610.710.810.9
11.011.111.211.311.411.511.611.711.811.9
cm of rain in a 30-day month
0.00.30.60.91.21.51.82.12.42.7
3.03.33.63.94.24.54.85.15.45.7
6.06.36.66.97.27.57.88.18.48.7
9.09.39.69.910.210.510.811.111.411.7
12.012.312.612.913.213.513.814.114.414.7
15.015.315.615.916.216.516.817.117.417.7
18.018.318.618.919.219.519.820.120.420.7
21.021.321.621.922.222.522.823.123.423.7
24.024.324.624.925.225.525.826.126.426.7
27.027.327.627.928.228.528.829.129.429.7
30.030.330.630.931.231.531.832.132.432.7
mm of rain a year
0306090120150180210240270
300330360390420450480510540570
600630660690720750780810840870
9009309609901,0201,0501,0801,1101,1401,170
1,2001,2301,2601,2901,3201,3501,3801,4101,4401,470
1,5001,5301,5601,5901,6201,6501,6801,7101,7401,770
1,8001,8301,8601,8901,9201,9501,9802,0102,0402,070
2,1002,1302,1602,1902,2202,2502,2802,3102,3402,370
2,4002,4302,4602,4902,5202,5502,5802,6102,6402,670
2,7002,7302,7602,7902,8202,8502,8802,9102,9402,970
3,0003,0303,0603,0903,1203,1503,1803,2103,2403,270
3,3003,3303,3603,3903,3203,4503,4803,5103,5403,570
inches of rain a year
0123456789
10111213141516171819
20212223242526272829
30313233343536373839
40414243444546474849
50515253545556575859
60616263646566676869
70717273747576777879
80818283848586878889
90919293949596979899
100101102103104105106107108109
110111112113114115116117118119
cm of rain a year
0369121518212427
30333639424548515457
60636669727578818487
90939699102105108111114117
120123126129132135138141144147
150153156159162165168171174177
180183186189192195198201204207
210213216219222225228231234237
240243246249252255258261264267
270273276279282285288291294297
300303306309312315318321324327
330333336339332345348351354357

Template:Weather box/colgreen can be used to produce a background color in a table cell, based off a given number. Insert {{Weather box/colgreen|0}}, with a number from the mm in a 30-day month table above as the first parameter, into a style statement.

Example
{| class="wikitable"
|-
| style="{{Weather box/colgreen|18}}"|0.7
| style="{{Weather box/colgreen|157}}"|6.2
| style="{{Weather box/colgreen|297}}"|11.7
|}

Will produce

0.7 6.2 11.7

Performance considerations

[ಬದಲಾಯಿಸಿ]

Template:Weather_box/colgreen has been optimized to handle a range of values which are changed into color codes by using a #switch function, with 25 branches, ordered by expected frequency. It can assign colors to rainfall in mm at over 460 numbers per second, or 9x faster than encoding color settings as 3-part hexadecimal conversions of milimetres. The 25 branches split the overall range into 12-unit brackets, rather than using a precise spectrum of hundreds of shades of color; however, in practice the 25 possible shades provide enough contrast to emphasize small versus large amounts of rainfall.