File:Green check.svg | This module is rated as ready for general use. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing. |
UsageEdit
Shows a full list of available values. Does not include the header. Invoked with {{#invoke:Storm categories|demo}}
.
Full list of available valuesEdit
Legend
- ↑ 1.0 1.1 Overriden from original color (Template:Color box #5ebaff)
- ↑ 2.0 2.1 Overriden from original icon (File:Severe tropical storm icon.png)
- ↑ 3.0 3.1 3.2 Overriden from original icon (TC)
Icon | ID | Name | Color | Sortkey | |||
---|---|---|---|---|---|---|---|
Basin | Name | Basin | Sortkey | ||||
File:Aus 1 icon.png | aus1 | Category 1 tropical cyclone | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | Aus/Fiji | 40006 | ||
File:Aus 2 icon.png | aus2 | Category 2 tropical cyclone | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | Aus/Fiji | 40008 | ||
File:Aus 3 icon.png | aus3 | Category 3 severe tropical cyclone | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | Aus/Fiji | 40010 | ||
File:Aus 4 icon.png | aus4 | Category 4 severe tropical cyclone | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | Aus/Fiji | 40013 | ||
File:Aus 5 icon.png | aus5 | Category 5 severe tropical cyclone | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | Aus/Fiji | 40015 | ||
TC | beaufort0 | Calm (Force 0) | #FFFFFF CTB: 21.00 (AAA) CTL: 8.53 (AAA) CTVL: 15.84 (AAA) | Global | 1500 | ||
TC | beaufort1 | Light Air (Force 1) | #757575[W 1][W 2] CTB: 4.56 (AA) CTL: 1.85 (NC) CTVL: 3.44 (NC) | Global | 1510 | ||
TC | beaufort10 | Storm (Force 10) | #AAFD9C CTB: 17.24 (AAA) CTL: 7.00 (AAA) CTVL: 13.00 (AAA) | Global | 1600 | ||
TC | beaufort11 | Violent Storm (Force 11) | #D6FFA4 CTB: 18.70 (AAA) CTL: 7.59 (AAA) CTVL: 14.10 (AAA) | Global | 1610 | ||
TC | beaufort12 | Hurricane-force (Force 12) | #FFFCD1 CTB: 20.10 (AAA) CTL: 8.16 (AAA) CTVL: 15.16 (AAA) | Global | 1620 | ||
TC | beaufort2 | Light Breeze (Force 2) | #909090[W 1] CTB: 6.58 (AA) CTL: 2.67 (NC) CTVL: 4.96 (AA) | Global | 1520 | ||
TC | beaufort3 | Gentle Breeze (Force 3) | #B7B7B7[W 1] CTB: 10.47 (AAA) CTL: 4.25 (NC) CTVL: 7.90 (AAA) | Global | 1530 | ||
TC | beaufort4 | Moderate Breeze (Force 4) | #D2D2D2 CTB: 13.89 (AAA) CTL: 5.64 (AA) CTVL: 10.48 (AAA) | Global | 1540 | ||
TC | beaufort5 | Fresh Breeze (Force 5) | #F1F1F1 CTB: 18.59 (AAA) CTL: 7.55 (AAA) CTVL: 14.02 (AAA) | Global | 1550 | ||
TC | beaufort6 | Strong Breeze (Force 6) | #007FCE[W 1][W 2] CTB: 4.93 (AA) CTL: 2.00 (NC) CTVL: 3.72 (NC) | Global | 1560 | ||
TC | beaufort7 | Near Gale (Force 7) | #46A1FF[W 1] CTB: 7.80 (AAA) CTL: 3.17 (NC) CTVL: 5.88 (AA) | Global | 1570 | ||
TC | beaufort8 | Gale (Force 8) | #5EDBF8 CTB: 12.96 (AAA) CTL: 5.26 (AA) CTVL: 9.78 (AAA) | Global | 1580 | ||
TC | beaufort9 | Strong Gale (Force 9) | #3BFDFD CTB: 16.65 (AAA) CTL: 6.76 (AA) CTVL: 12.56 (AAA) | Global | 1590 | ||
File:Category 1 hurricane icon.png | cat1 | atl | Category 1 hurricane | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | Atl/EPac/SAtl | 80010 | |
default | Category 1-equivalent tropical cyclone | ||||||
epac | Category 1 hurricane | ||||||
satl | Category 1 hurricane | ||||||
wpac | Category 1-equivalent typhoon | ||||||
File:Category 2 hurricane icon.png | cat2 | atl | Category 2 hurricane | #ffe775 CTB: 16.94 (AAA) CTL: 6.88 (AA) CTVL: 12.78 (AAA) | Atl/EPac/SAtl | 80020 | |
default | Category 2-equivalent tropical cyclone | ||||||
epac | Category 2 hurricane | ||||||
satl | Category 2 hurricane | ||||||
wpac | Category 2-equivalent typhoon | ||||||
File:Category 3 hurricane icon.png | cat3 | atl | Category 3 hurricane | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | Atl/EPac/SAtl | 80030 | |
default | Category 3-equivalent tropical cyclone | ||||||
epac | Category 3 hurricane | ||||||
satl | Category 3 hurricane | ||||||
wpac | Category 3-equivalent typhoon | ||||||
File:Category 4 hurricane icon.png | cat4 | atl | Category 4 hurricane | #ff8f20[W 1] CTB: 9.20 (AAA) CTL: 3.74 (NC) CTVL: 6.94 (AA) | Atl/EPac/SAtl | 80040 | |
default | Category 4-equivalent tropical cyclone | ||||||
epac | Category 4 hurricane | ||||||
satl | Category 4 hurricane | ||||||
wpac | Category 4-equivalent typhoon | ||||||
File:Category 5 hurricane icon.png | cat5 | atl | Category 5 hurricane | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | Atl/EPac/SAtl | 80050 | |
default | Category 5-equivalent tropical cyclone | ||||||
epac | Category 5 hurricane | ||||||
satl | Category 5 hurricane | ||||||
wpac | Category 5-equivalent super typhoon | ||||||
File:Cyclonic storm icon.png | cs | Cyclonic storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | NIO | 50006 | ||
File:Cyclonic storm icon.png | cyclstorm | Cyclonic storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | NIO | 50006 | ||
File:Tropical Depression.png | d | Tropical depression | #80ccff[1] CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | Global | 90 | ||
File:Deep depression icon.png | dd | Deep depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | NIO | 50002 | ||
File:Deep depression icon.png | deepdepression | Deep depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | NIO | 50002 | ||
File:Tropical Depression.png | depression | Tropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 90 | ||
File:Disturbance icon.png | di | Tropical disturbance | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | Global | 80 | ||
File:Disturbance icon.png | disturbance | Tropical disturbance | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | Global | 80 | ||
File:Ef-scale0.png | ef0 | EF0 tornado | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | Global | 1000 | ||
File:Ef-scale1.png | ef1 | EF1 tornado | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | Global | 1010 | ||
File:Ef-scale2.png | ef2 | EF2 tornado | #ffe775 CTB: 16.94 (AAA) CTL: 6.88 (AA) CTVL: 12.78 (AAA) | Global | 1020 | ||
File:Ef-scale3.png | ef3 | EF3 tornado | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | Global | 1030 | ||
File:Ef-scale4.png | ef4 | EF4 tornado | #ff8f20[W 1] CTB: 9.20 (AAA) CTL: 3.74 (NC) CTVL: 6.94 (AA) | Global | 1040 | ||
File:Ef-scale5.png | ef5 | EF5 tornado | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | Global | 1050 | ||
File:Ef-scaleU.png | efu | EFU tornado | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Global | 1001 | ||
File:Extremely severe cyclonic storm icon.png | escs | Extremely severe cyclonic storm | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | NIO | 50015 | ||
File:Extremely severe cyclonic storm icon.png | esvrcyclstorm | Extremely severe cyclonic storm | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | NIO | 50015 | ||
File:Extratropical cyclone icon.png | et | Extratropical cyclone | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Global | 50 | ||
File:Extratropical cyclone icon.png | ex | Extratropical cyclone | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Global | 50 | ||
File:Extratropical cyclone icon.png | extratropical | Extratropical cyclone | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Global | 50 | ||
TC | f0 | Calm (Force 0) | #FFFFFF CTB: 21.00 (AAA) CTL: 8.53 (AAA) CTVL: 15.84 (AAA) | Global | 1500 | ||
TC | f1 | Light Air (Force 1) | #757575[W 1][W 2] CTB: 4.56 (AA) CTL: 1.85 (NC) CTVL: 3.44 (NC) | Global | 1510 | ||
TC | f10 | Storm (Force 10) | #AAFD9C CTB: 17.24 (AAA) CTL: 7.00 (AAA) CTVL: 13.00 (AAA) | Global | 1600 | ||
TC | f11 | Violent Storm (Force 11) | #D6FFA4 CTB: 18.70 (AAA) CTL: 7.59 (AAA) CTVL: 14.10 (AAA) | Global | 1610 | ||
TC | f12 | Hurricane-force (Force 12) | #FFFCD1 CTB: 20.10 (AAA) CTL: 8.16 (AAA) CTVL: 15.16 (AAA) | Global | 1620 | ||
TC | f2 | Light Breeze (Force 2) | #909090[W 1] CTB: 6.58 (AA) CTL: 2.67 (NC) CTVL: 4.96 (AA) | Global | 1520 | ||
TC | f3 | Gentle Breeze (Force 3) | #B7B7B7[W 1] CTB: 10.47 (AAA) CTL: 4.25 (NC) CTVL: 7.90 (AAA) | Global | 1530 | ||
TC | f4 | Moderate Breeze (Force 4) | #D2D2D2 CTB: 13.89 (AAA) CTL: 5.64 (AA) CTVL: 10.48 (AAA) | Global | 1540 | ||
TC | f5 | Fresh Breeze (Force 5) | #F1F1F1 CTB: 18.59 (AAA) CTL: 7.55 (AAA) CTVL: 14.02 (AAA) | Global | 1550 | ||
TC | f6 | Strong Breeze (Force 6) | #007FCE[W 1][W 2] CTB: 4.93 (AA) CTL: 2.00 (NC) CTVL: 3.72 (NC) | Global | 1560 | ||
TC | f7 | Near Gale (Force 7) | #46A1FF[W 1] CTB: 7.80 (AAA) CTL: 3.17 (NC) CTVL: 5.88 (AA) | Global | 1570 | ||
TC | f8 | Gale (Force 8) | #5EDBF8 CTB: 12.96 (AAA) CTL: 5.26 (AA) CTVL: 9.78 (AAA) | Global | 1580 | ||
TC | f9 | Strong Gale (Force 9) | #3BFDFD CTB: 16.65 (AAA) CTL: 6.76 (AA) CTVL: 12.56 (AAA) | Global | 1590 | ||
File:Aus 1 icon.png | fiji1 | Category 1 tropical cyclone | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | Aus/Fiji | 40006 | ||
File:Aus 2 icon.png | fiji2 | Category 2 tropical cyclone | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | Aus/Fiji | 40008 | ||
File:Aus 3 icon.png | fiji3 | Category 3 severe tropical cyclone | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | Aus/Fiji | 40010 | ||
File:Aus 4 icon.png | fiji4 | Category 4 severe tropical cyclone | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | Aus/Fiji | 40013 | ||
File:Aus 5 icon.png | fiji5 | Category 5 severe tropical cyclone | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | Aus/Fiji | 40015 | ||
File:Intense tropical cyclone icon.png | intense | Intense tropical cyclone | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | SWIO | 30008 | ||
File:Intense tropical cyclone icon.png | itc | Intense tropical cyclone | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | SWIO | 30008 | ||
File:Land depression icon.png | land | Land depression | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | NIO | 50000 | ||
File:Land depression icon.png | landdepression | Land depression | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | NIO | 50000 | ||
File:Land depression icon.png | ld | Land depression | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | NIO | 50000 | ||
File:Tropical Low.png | low | Tropical low | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Aus/Fiji | 40002 | ||
File:Monsoon Depression icon.png | md | Monsoon depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 30 | ||
TC | moddepression | Moderate tropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 95 | ||
File:Monsoon Depression icon.png | monsoondepression | Monsoon depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 30 | ||
File:Moderate tropical storm icon.png | mstorm | Moderate tropical storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | SWIO | 30004 | ||
File:Moderate tropical storm icon.png | mts | Moderate tropical storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | SWIO | 30004 | ||
File:Moderate tropical storm icon.png | mtstorm | Moderate tropical storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | Global | 105 | ||
File:Cyclonic storm icon.png | niocyclone | Cyclonic storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | NIO | 50006 | ||
File:Depression icon.png | niodepression | Depression | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | NIO | 50001 | ||
File:Land depression icon.png | nioland | Land depression | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | NIO | 50000 | ||
File:Tropical Depression.png | nwpdepression | Tropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 90 | ||
File:Severe tropical storm icon.png | nwpsevere | Severe tropical storm | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | Global | 120 | ||
File:Tropical storm icon.png | nwpstorm | Tropical storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | Global | 100 | ||
File:Depression icon.png | od | Overland depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 60 | ||
File:Depression icon.png | overland | Overland depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 60 | ||
File:Depression icon.png | overlanddepression | Overland depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 60 | ||
File:Post tropical cyclone icon.png | post | Post-tropical depression | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Global | 70 | ||
File:Post tropical cyclone icon.png | posttropical | Post-tropical depression | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Global | 70 | ||
File:Potential tropical cyclone icon.png | potential | Potential tropical cyclone | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | Global | 25 | ||
File:Potential tropical cyclone icon.png | potentialtropicalcyclone | Potential tropical cyclone | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | Global | 25 | ||
File:Potential tropical cyclone icon.png | pt | Potential tropical cyclone | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | Global | 25 | ||
File:Remnant low icon.png | remnant | Post-tropical depression | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Global | 70 | ||
File:Remnant low icon.png | remnantlow | Post-tropical depression | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Global | 70 | ||
File:Remnant low icon.png | rl | Post-tropical depression | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Global | 70 | ||
File:RsiC0.png | rsi0 | Category 0 "Nuisance" | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Atl/EPac/SAtl | 80100 | ||
File:RsiC1.png | rsi1 | Category 1 "Notable" | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | Atl/EPac/SAtl | 80110 | ||
File:RsiC2.png | rsi2 | Category 2 "Minor" | #ffe775 CTB: 16.94 (AAA) CTL: 6.88 (AA) CTVL: 12.78 (AAA) | Atl/EPac/SAtl | 80120 | ||
File:RsiC3.png | rsi3 | Category 3 "Major" | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | Atl/EPac/SAtl | 80130 | ||
File:RsiC4.png | rsi4 | Category 4 "Crippling" | #ff8f20[W 1] CTB: 9.20 (AAA) CTL: 3.74 (NC) CTVL: 6.94 (AA) | Atl/EPac/SAtl | 80140 | ||
File:RsiC5.png | rsi5 | Category 5 "Extreme" | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | Atl/EPac/SAtl | 80150 | ||
File:RsiC4.png | rsicrippling | Category 4 "Crippling" | #ff8f20[W 1] CTB: 9.20 (AAA) CTL: 3.74 (NC) CTVL: 6.94 (AA) | Atl/EPac/SAtl | 80140 | ||
File:RsiC5.png | rsiextreme | Category 5 "Extreme" | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | Atl/EPac/SAtl | 80150 | ||
File:RsiC3.png | rsimajor | Category 3 "Major" | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | Atl/EPac/SAtl | 80130 | ||
File:RsiC2.png | rsiminor | Category 2 "Minor" | #ffe775 CTB: 16.94 (AAA) CTL: 6.88 (AA) CTVL: 12.78 (AAA) | Atl/EPac/SAtl | 80120 | ||
File:RsiC1.png | rsinotable | Category 1 "Notable" | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | Atl/EPac/SAtl | 80110 | ||
File:RsiC0.png | rsinuisance | Category 0 "Nuisance" | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Atl/EPac/SAtl | 80100 | ||
File:Severe cyclonic storm icon.png | scs | Severe cyclonic storm | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | NIO | 50008 | ||
File:Subtropical Depression icon.png | sd | Subtropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 62 | ||
File:Severe tropical storm icon.png | severe | Severe tropical storm | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | Global | 120 | ||
TC | severedep | Severe tropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 120 | ||
File:Severe tropical storm icon.png | severets | Severe tropical storm | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | Global | 120 | ||
File:Tropical Depression.png | shdepression | Tropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 90 | ||
TC | shem1 | Tropical cyclone | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | Historical | 20008 | ||
TC | shem2 | Tropical cyclone | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | Historical | 20008 | ||
TC | shem3 | Tropical cyclone | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | SWIO | 30006 | ||
TC | shem4 | Tropical cyclone | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | Historical | 20008 | ||
TC | shem5 | Severe tropical cyclone | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | Historical | 20010 | ||
File:Tropical Depression.png | shemdepression | Tropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 90 | ||
TC | shemsvrtc | Severe tropical cyclone | #ffe775 CTB: 16.94 (AAA) CTL: 6.88 (AA) CTVL: 12.78 (AAA) | Historical | 20020 | ||
TC | shemtc | Tropical cyclone | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | SWIO | 30006 | ||
File:Tropical Depression.png | spdepression | Tropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 90 | ||
File:Super cyclonic storm icon.png | sprcyclstorm | Super cyclonic storm | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | NIO | 50020 | ||
File:Subtropical storm icon.png | ss | Subtropical storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | Global | 65 | ||
File:Tropical storm icon.png | storm | Tropical storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | Global | 100 | ||
File:Severe tropical storm icon.png | strong | Severe tropical storm | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | Global | 120 | ||
File:Severe tropical storm icon.png | sts | Severe tropical storm | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | Global | 120 | ||
TC | sty | Category 4 super typhoon | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | Atl/EPac/SAtl | 80045 | ||
TC | styphoon | Supertyphoon | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | WPAC | 60050 | ||
File:Moderate tropical storm icon.png | sub | Moderate tropical storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | SWIO | 30004 | ||
File:Subtropical Depression icon.png | subdepression | Subtropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 62 | ||
File:Disturbance icon.png | subdisturbance | Subtropical disturbance | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | Global | 55 | ||
TC | sublow | Subtropical low | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Aus/Fiji | 40000 | ||
File:Subtropical storm icon.png | subtropical | Subtropical storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | Global | 65 | ||
TC | subtropicalcyclone | Subtropical cyclone | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | Global | 70 | ||
File:Super cyclonic storm icon.png | sucs | Super cyclonic storm | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | NIO | 50020 | ||
TC | supertyphoon | Category 4 super typhoon | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | Atl/EPac/SAtl | 80045 | ||
File:Severe cyclonic storm icon.png | svrcyclstorm | Severe cyclonic storm | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | NIO | 50008 | ||
TC | svtyphoon | Severe typhoon | #ff8f20[W 1] CTB: 9.20 (AAA) CTL: 3.74 (NC) CTVL: 6.94 (AA) | WPAC | 60015 | ||
File:Tropical Depression.png | swiodepression | Tropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 90 | ||
File:Disturbance icon.png | swiodisturbance | Tropical disturbance | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | Global | 80 | ||
File:Severe tropical storm south icon.png[2] | swiosts | Severe tropical storm | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | Global | 120 | ||
File:SWIO tropical cyclone icon.png[3] | swiotc | Tropical cyclone | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | SWIO | 30006 | ||
File:Subtropical Depression icon.png | swsubdep | Subtropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 62 | ||
File:SWIO tropical cyclone icon.png[3] | tc | Tropical cyclone | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | SWIO | 30006 | ||
File:Tropical Depression.png | td | Tropical depression | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Global | 90 | ||
File:Disturbance icon.png | tdist | Tropical disturbance | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | Global | 80 | ||
File:Tropical Low.png | tl | Tropical low | #5ebaff[W 1] CTB: 9.94 (AAA) CTL: 4.04 (NC) CTVL: 7.50 (AAA) | Aus/Fiji | 40002 | ||
TC | tropicalcyclone | Tropical cyclone | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | SWIO | 30006 | ||
File:Tropical storm icon.png | ts | Tropical storm | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | Global | 100 | ||
File:Typhoon icon.png | ty | Typhoon | #fdaf9a CTB: 11.78 (AAA) CTL: 4.78 (AA) CTVL: 8.88 (AAA) | WPAC | 60010 | ||
File:Typhoon icon.png | typhoon | Typhoon | #fdaf9a CTB: 11.78 (AAA) CTL: 4.78 (AA) CTVL: 8.88 (AAA) | WPAC | 60010 | ||
? | unknown | Unknown strength tropical cyclone | #c0c0c0 CTB: 11.54 (AAA) CTL: 4.69 (AA) CTVL: 8.71 (AAA) | Global | 0 | ||
File:Very intense tropical cyclone icon.png | vintense | Very intense tropical cyclone | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | SWIO | 30010 | ||
File:Very intense tropical cyclone icon.png | vitc | Very intense tropical cyclone | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | SWIO | 30010 | ||
File:Violent typhoon icon.png | vity | Violent typhoon | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | WPAC | 60030 | ||
File:Violent typhoon icon.png | vityphoon | Violent typhoon | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | WPAC | 60030 | ||
File:Very severe cyclonic storm icon.png | vscs | Very severe cyclonic storm | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | NIO | 50010 | ||
File:Very strong typhoon icon.png | vstrtyphoon | Very strong typhoon | #fe887d[W 1] CTB: 9.03 (AAA) CTL: 3.67 (NC) CTVL: 6.81 (AA) | WPAC | 60020 | ||
File:Very strong typhoon icon.png | vsty | Very strong typhoon | #fe887d[W 1] CTB: 9.03 (AAA) CTL: 3.67 (NC) CTVL: 6.81 (AA) | WPAC | 60020 | ||
File:Very strong typhoon icon.png | vstyphoon | Very strong typhoon | #fe887d[W 1] CTB: 9.03 (AAA) CTL: 3.67 (NC) CTVL: 6.81 (AA) | WPAC | 60020 | ||
File:Very severe cyclonic storm icon.png | vsvrcyclstorm | Very severe cyclonic storm | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | NIO | 50010 | ||
File:RsiC0.png | wssi0 | No impacts | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Atl/EPac/SAtl | 80200 | ||
File:RsiC1.png | wssi1 | Limited impacts | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | Atl/EPac/SAtl | 80210 | ||
File:RsiC2.png | wssi2 | Minor impacts | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | Atl/EPac/SAtl | 80220 | ||
File:RsiC3.png | wssi3 | Moderate impacts | #ff8f20[W 1] CTB: 9.20 (AAA) CTL: 3.74 (NC) CTVL: 6.94 (AA) | Atl/EPac/SAtl | 80230 | ||
File:RsiC4.png | wssi4 | Major impacts | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | Atl/EPac/SAtl | 80240 | ||
File:RsiC5.png | wssi5 | Extreme impacts | #cf75ff[W 1] CTB: 7.64 (AAA) CTL: 3.10 (NC) CTVL: 5.76 (AA) | Atl/EPac/SAtl | 80250 | ||
File:RsiC5.png | wssiextreme | Extreme impacts | #cf75ff[W 1] CTB: 7.64 (AAA) CTL: 3.10 (NC) CTVL: 5.76 (AA) | Atl/EPac/SAtl | 80250 | ||
File:RsiC1.png | wssilimited | Limited impacts | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | Atl/EPac/SAtl | 80210 | ||
File:RsiC4.png | wssimajor | Major impacts | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | Atl/EPac/SAtl | 80240 | ||
File:RsiC2.png | wssiminor | Minor impacts | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | Atl/EPac/SAtl | 80220 | ||
File:RsiC3.png | wssimoderate | Moderate impacts | #ff8f20[W 1] CTB: 9.20 (AAA) CTL: 3.74 (NC) CTVL: 6.94 (AA) | Atl/EPac/SAtl | 80230 | ||
File:RsiC0.png | wssinone | No impacts | #cccccc CTB: 13.08 (AAA) CTL: 5.31 (AA) CTVL: 9.86 (AAA) | Atl/EPac/SAtl | 80200 | ||
File:Disturbed weather icon.png | zodw | Zone of disturbed weather | #80ccff CTB: 12.00 (AAA) CTL: 4.87 (AA) CTVL: 9.05 (AAA) | SWIO | 30000 | ||
File:Category 1 hurricane icon.png | 1 | not available | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | not available | |||
File:Category 2 hurricane icon.png | 2 | not available | #ffe775 CTB: 16.94 (AAA) CTL: 6.88 (AA) CTVL: 12.78 (AAA) | not available | |||
File:Category 3 hurricane icon.png | 3 | not available | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | not available | |||
File:Category 4 hurricane icon.png | 4 | not available | #ff8f20[W 1] CTB: 9.20 (AAA) CTL: 3.74 (NC) CTVL: 6.94 (AA) | not available | |||
File:Category 5 hurricane icon.png | 5 | not available | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | not available | |||
File:Aus 1 icon.png | a1 | not available | #00faf4 CTB: 15.98 (AAA) CTL: 6.49 (AA) CTVL: 12.05 (AAA) | not available | |||
File:Aus 2 icon.png | a2 | not available | #ccffff CTB: 19.32 (AAA) CTL: 7.84 (AAA) CTVL: 14.57 (AAA) | not available | |||
File:Aus 3 icon.png | a3 | not available | #ffffcc CTB: 20.43 (AAA) CTL: 8.30 (AAA) CTVL: 15.41 (AAA) | not available | |||
File:Aus 4 icon.png | a4 | not available | #ffc140 CTB: 12.95 (AAA) CTL: 5.26 (AA) CTVL: 9.77 (AAA) | not available | |||
File:Aus 5 icon.png | a5 | not available | #ff6060[W 1] CTB: 7.09 (AAA) CTL: 2.88 (NC) CTVL: 5.35 (AA) | not available | |||
File:Extratropical storm icon.png | et2 | not available | |||||
File:Extratropical storm icon.png | ex2 | not available | |||||
File:Extratropical storm icon.png | extratropical2 | not available | |||||
File:Severe tropical storm south icon.png | stss | not available |
Warnings
This table contains warnings than should be addressed. Please note that some warnings cannot be fully addressed without changes that would require consensus.
- ↑ 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.50 1.51 1.52 1.53 1.54 1.55 1.56 1.57 1.58 1.59 1.60 1.61 1.62 1.63 1.64 1.65 This color has contrast issues with links (not WCAG 2.0 AA-compatible). It should not be used in conjunction with a link.
- ↑ 2.0 2.1 2.2 2.3 2.4 This color has contrast issues with visited links (not WCAG 2.0 AA-compatible with #0b0080). It should not be used in conjunction with a visited link.
--
-- This module handles demonstration and list of possible values for all storm
-- category templates! Please test this module on [[Module:Storm categories/demo/doc]]
-- before publishing to avoid errros. Thank you!
--
local colorRatio = require("Module:Color contrast")._ratio
local TableTools = require("Module:TableTools")
local stormcats = require("Module:Storm categories")
local cats = require("Module:Storm categories/categories").cats
local colors = require("Module:Storm categories/colors").colors
local icons = require("Module:Storm categories/icons").icons
local p = {}
local customKeys = {}
for k, v in pairs(colors) do
table.insert(customKeys, k)
end
for k, v in pairs(icons) do
table.insert(customKeys, k)
end
TableTools.removeDuplicates(customKeys)
function tableEmpty(_table)
for k, v in pairs(_table) do
return false
end
return true
end
--- Generates and renderds the demo table.
-- @param frame The Scribunto frame.
function p.demo(frame)
local plain = (frame.args["plain"] or frame:getParent().args["plain"] or "") ~= ""
local verbose = (frame.args["verbose"] or frame:getParent().args["verbose"] or "") ~= ""
local legend = setmetatable({}, { refgroupname = "" })
local errors = setmetatable({}, { refgroupname = "E" })
local warnings = setmetatable({}, { refgroupname = "W" })
--- Builds the entire reflist
-- @param _group The group to build for. Uses `legend` by default.
function buildReflist(_group)
group = _group or legend
return frame:expandTemplate{ title = 'reflist', args = {
group = getmetatable(group)["refgroupname"]
} }
end
--- Returns a single <ref> tag containing the legend provided and
-- attaches the note definition to the list of notes.
-- @param details The details of the legend.
-- @param _group The group to write in. Uses `legend` by default.
function createLegend(details, _group)
hash = string.sub(mw.hash.hashValue("md5", details), 0, 8)
group = _group or legend
if group[hash] == nil then
group[hash] = plain and "" or frame:extensionTag{
-- <ref name="hash">details</ref>
name = 'ref',
content = mw.ustring.gsub(details, "%[%[File:([^%|]+)[^%]]*%]%]", "[[:File:%1]]"),
args = {
name = hash,
group = getmetatable(group)["refgroupname"]
}
}
end
-- <ref name="hash"/>
return plain and "" or frame:extensionTag{ name = 'ref', args = {
name = hash,
group = getmetatable(group)["refgroupname"]
} }
end
--- Checks for color contrast issues and tags accordingly.
-- Returns the refernce tag, so this should be used in conjunction with an
-- HTML node's :wikitext function.
function contrastCheck(color)
local catColorBlackRatio = colorRatio({ "#" .. color, "black" })
local catColorLinkRatio = colorRatio({ "#" .. color, "#0645ad" })
local catColorVisitedLinkRatio = colorRatio({ "#" .. color, "#0b0080" })
local finalWikitext = ""
if catColorBlackRatio == "?" or catColorLinkRatio == "?" or catColorVisitedLinkRatio == "?" then
finalWikitext = finalWikitext ..
createLegend("This color must be a hexadecimal color.", errors)
else
if catColorBlackRatio < 4.5 then
finalWikitext = finalWikitext ..
createLegend("This color has [[MOS:COLOR|contrast issues]] with black (not WCAG 2.0 AA-compatible). It will be unusable on all infoboxes and storm season summaries.", errors)
end
if catColorLinkRatio < 4.5 then
finalWikitext = finalWikitext ..
createLegend("This color has [[MOS:COLOR|contrast issues]] with links (not WCAG 2.0 AA-compatible). It should not be used in conjunction with a link.", warnings)
end
if catColorVisitedLinkRatio < 4.5 then
finalWikitext = finalWikitext ..
createLegend("This color has [[MOS:COLOR|contrast issues]] with visited links (not WCAG 2.0 AA-compatible with #0b0080). It should not be used in conjunction with a visited link.", warnings)
end
if actualCat == "c0c0c0" and cat[sortkey] ~= 0 then
finalWikitext = finalWikitext ..
createLegend("This category is using a color reserved specifically for the \"unknown\" category.", warnings)
end
end
return finalWikitext
end
function colorInfo(color, verbose, extra)
local catColorBlackRatio = colorRatio({ "#" .. color, "black" })
local catColorLinkRatio = colorRatio({ "#" .. color, "#0645ad" })
local catColorVisitedLinkRatio = colorRatio({ "#" .. color, "#0b0080" })
local nc = tostring(mw.html.create("abbr")
:wikitext("NC")
:attr("title", "Does not satisfy the minimum WCAG 2.1 compliance level for color contrast (AA)")
);
local aa = tostring(mw.html.create("abbr")
:wikitext("AA")
:attr("title", "WCAG 2.1 Level AA: Acceptable compliance")
);
local aaa = tostring(mw.html.create("abbr")
:wikitext("AAA")
:attr("title", "WCAG 2.1 Level AAA: Optimal compliance")
);
function contrastLevel(contrast)
return contrast >= 7 and aaa or (contrast >= 4.5 and aa or nc)
end
return mw.html.create("td")
:attr("data-sort-value", math.min(catColorBlackRatio))
:wikitext(
"#" .. color .. (extra or "") .. contrastCheck(color) .. (verbose and ("<br/>"
.. tostring(
mw.html.create("abbr")
:attr("title", "Contrast to black")
:wikitext("CTB")
) .. ": " .. string.format("%.2f", catColorBlackRatio) .. " (" .. contrastLevel(catColorBlackRatio) .. ")<br/>"
.. tostring(
mw.html.create("abbr")
:attr("title", "Contrast to links")
:wikitext("CTL")
) .. ": " .. string.format("%.2f", catColorLinkRatio) .. " (" .. contrastLevel(catColorLinkRatio) .. ")<br/>"
.. tostring(
mw.html.create("abbr")
:attr("title", "Contrast to visited links")
:wikitext("CTVL")
) .. ": " .. string.format("%.2f", catColorVisitedLinkRatio) .. " (" .. contrastLevel(catColorVisitedLinkRatio) .. ")") or "")
)
end
local categoryTable = mw.html.create("table")
:addClass("wikitable")
:addClass("sortable")
:attr("style", "width: 100%")
categoryTable
:node(
mw.html.create("tr")
:node(mw.html.create("th"):wikitext("Icon")
:attr("class", "unsortable")
:attr("rowspan", "2")
:css("width", "0"))
:node(mw.html.create("th"):wikitext("ID")
:attr("rowspan", "2"))
:node(mw.html.create("th"):wikitext("Name")
:attr("colspan", "2"))
:node(mw.html.create("th"):wikitext("Color")
:attr("rowspan", "2")
:attr("colspan", "2"))
:node(mw.html.create("th"):wikitext("Sortkey")
:attr("colspan", "2"))
):node(
mw.html.create("tr")
:node(mw.html.create("th"):wikitext("Basin"))
:node(mw.html.create("th"):wikitext("Name"))
:node(mw.html.create("th"):wikitext("Basin"))
:node(mw.html.create("th"):wikitext("Sortkey")
:attr("data-sort-type", "number"))
)
for name, cat in TableTools.sortedPairs(cats) do
local rows = { mw.html.create("tr") }
local row = rows[1]
local actualIcon = stormcats._icon(name)
local icon = mw.html.create("td")
:wikitext(actualIcon)
if cat["icon"] ~= nil and actualIcon ~= cat["icon"] then
icon:wikitext(
createLegend("Overriden from original icon (" .. cat["icon"] .. ")")
)
end
local id = mw.html.create("td")
:wikitext(name)
local actualColor = stormcats._color(name)
local colorPreview = mw.html.create("td")
:attr("style", "background-color: #" .. actualColor .. "; padding: 0; width: 1.8em")
local color = colorInfo(
actualColor,
verbose,
actualColor ~= cat["color"] and createLegend(
"Overriden from original color ({{color box|#"
.. cat["color"]
.. "}} #"
.. cat["color"]
.. ")"
) or ""
):css("width", "0"):css("white-space", "nowrap")
local sortkeyCategory = mw.html.create("td")
:attr("data-sort-value", cat["sortkey"])
local sortkey = mw.html.create("td")
:attr("data-sort-value", cat["sortkey"])
:wikitext(cat["sortkey"])
if cat["sortkey"] < 0 then
sortkeyCategory:wikitext("Invalid")
elseif cat["sortkey"] < 20000 then
sortkeyCategory:wikitext("Global")
elseif cat["sortkey"] < 30000 then
sortkeyCategory:wikitext("Historical")
elseif cat["sortkey"] < 40000 then
sortkeyCategory:wikitext("SWIO")
elseif cat["sortkey"] < 50000 then
sortkeyCategory:wikitext("Aus/Fiji")
elseif cat["sortkey"] < 60000 then
sortkeyCategory:wikitext("NIO")
elseif cat["sortkey"] < 80000 then
sortkeyCategory:wikitext("WPAC")
elseif cat["sortkey"] < 90000 then
sortkeyCategory:wikitext("Atl/EPac/SAtl")
elseif cat["sortkey"] < 100000 then
sortkeyCategory:attr("style", "color: gray")
sortkeyCategory:wikitext("''Global''")
else
sortkeyCategory:wikitext("Invalid")
end
if type(cat["name"]) == "string" then
local name = mw.html.create("td")
:attr("colspan", "2")
:wikitext(cat["name"])
row:node(icon)
row:node(id)
row:node(name)
else
local nameTableLength = TableTools.size(cat["name"])
icon:attr("rowspan", nameTableLength)
id:attr("rowspan", nameTableLength)
colorPreview:attr("rowspan", nameTableLength)
color:attr("rowspan", nameTableLength)
sortkeyCategory:attr("rowspan", nameTableLength)
sortkey:attr("rowspan", nameTableLength)
row:node(icon)
row:node(id)
local firstDone = false
for key, basinName in TableTools.sortedPairs(cat["name"]) do
if firstDone then
local nameRow = mw.html.create("tr")
nameRow
:node(mw.html.create("td"):wikitext(key))
:node(mw.html.create("td"):wikitext(basinName))
table.insert(rows, nameRow)
else
firstDone = true
row
:node(mw.html.create("td"):wikitext(key))
:node(mw.html.create("td"):wikitext(basinName))
end
end
end
row:node(colorPreview)
row:node(color)
row:node(sortkeyCategory)
row:node(sortkey)
for _, _row in TableTools.sortedPairs(rows) do
categoryTable:node(_row)
end
end
for name, _ in TableTools.sortedPairs(TableTools.listToSet(customKeys)) do
if cats[name] == nil then
local row = mw.html.create("tr")
local icon = stormcats._icon(name, true)
row
:node(mw.html.create("td")
:wikitext(
icon ~= nil
and icon
or "''<span style=\"color:gray\">N/A</span>''"
))
:node(mw.html.create("td"):wikitext(name))
local color = stormcats._color(name, true)
-- Add more conditions eventually
if color ~= nil then
row
:node(mw.html.create("td")
:attr("colspan", "2")
:wikitext("''<span style=\"color:gray\">not available</span>''"))
:node(mw.html.create("td")
:attr("style", "background-color: #" .. color .. "; padding: 0; width: 1.8em"))
:node(colorInfo(color, verbose))
:css("width", "0")
:css("white-space", "nowrap")
:node(mw.html.create("td")
:attr("colspan", "2")
:wikitext("''<span style=\"color:gray\">not available</span>''"))
else
row
:node(mw.html.create("td")
:attr("colspan", "6")
:wikitext("''<span style=\"color:gray\">not available</span>''"))
end
categoryTable:node(row)
end
end
out = ""
if not plain and not tableEmpty(errors) then
out = out
.. tostring(mw.html.create("h4"):wikitext("Error"))
.. tostring(mw.html.create("p"):wikitext("This table contains errors than need to be addressed immediately, as it may cause errors on a large amount of pages."))
.. buildReflist(errors)
end
if not plain and not tableEmpty(legend) then
out = out
.. tostring(mw.html.create("h4"):wikitext("Legend"))
.. buildReflist(legend)
end
out = out .. tostring(categoryTable)
if not plain and not tableEmpty(warnings) then
out = out
.. tostring(mw.html.create("h4"):wikitext("Warnings"))
.. tostring(mw.html.create("p"):wikitext("This table contains warnings than should be addressed. Please note that some warnings cannot be fully addressed without changes that would require consensus."))
.. buildReflist(warnings)
end
return mw.text.trim(out)
end
return p