Module:Storm categories
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
This Lua module is used on approximately 5,400 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
In order to conform to Wikipedia:Manual of Style/Accessibility#Color guidelines, do not use storm colors in conjunction with links. This is necessary to avoid problems related to lack of contrast. |
This module depends on the following other modules: |
This template is used to control a multitude of tropical cyclone-related templates: {{storm colour}}, {{storm name}}, and {{storm icon}}. It acts as a centralized location for storm categories to avoid discrepancies between templates, allowing for the same ID to be used across all related templates.
Data is located in the following submodules:
- Module:Storm categories/categories for fully-detailed storm categories
- Module:Storm categories/colors for color-only IDs
- Module:Storm categories/icons for icon-only IDs
Usage
This module exports three functions for templates: p.color
, p.name
, p.sortkey
, and p.icon
. It also provides p._color
, p._name
, p._sortkey
, and p._icon
for use in other modules.
All input IDs are case-insensitive, and all non-alphanumeric characters are stripped.
Color
Provides the color of the given tropical cyclone category code. This comes in the format of their raw hexadecimal code. This function is available as a template at {{storm colour}}.
Code | Output |
---|---|
<span style="padding:4px;border:1px solid black;background-color:#{{#invoke:Storm categories|color|depression}}">depression</span>
|
depression |
Name
Provides the name of the given tropical cyclone category code. A optional basin argument can be provided as the second argument in order to slightly tweak the name of the category, if the given category definition supports it. This function is available as a template at {{storm name}}.
Code | Interpreted | Output | |
---|---|---|---|
ID | Basin | ||
{{#invoke:Storm categories|name|severe}}
|
severe | (default) | Severe tropical storm |
{{#invoke:Storm categories|name|spr - cYcL -s TorM}}
|
sprcyclstorm | (default) | Super cyclonic storm |
{{#invoke:Storm categories|name|cat5}}
|
cat5 | (default) | Category 5-equivalent tropical cyclone |
{{#invoke:Storm categories|name|cat5|ATl}}
|
cat5 | ATl | Category 5 major hurricane |
{{#invoke:Storm categories|name|cat5|WPac}}
|
cat5 | WPac | Category 5-equivalent super typhoon |
Sortkey
The sortkey is a number that aids in sorting categories. Using the sortkey, it is possible to automatically sort a table of tropical cyclones given their category code. Due to the ambiguous nature of sortkeys, tables may be sorted incorrectly if values from other basins were used. For categories that span multiple basins, however, (e.g. depression
and storm
) they are given the lowest possible sortkeys in order to achieve maximum compatibility.
This sortkey is used in {{Tropical cyclone season effects (cyclone)}}, a subtemplate of {{Tropical cyclone season effects}}.
The sortkey format is as follows. Note that not all values between the given ranges were used. The arrangement of these were determined by their positions in the {{Storm colour}} template.
Basin | Sortkey range |
---|---|
Global (unused) | 90000 to 99999 |
Atl/EPac/SAtl | 80000 to 89999 |
WPac | 60000 to 69999 |
Nio | 50000 to 59999 |
Aus/Fiji | 40000 to 49999 |
SWio | 30000 to 39999 |
Historical | 20000 to 29999 |
Global | 0 to 9999 |
A demonstration of a sortable table using these sortkeys can be found below. Note that it does not use categories outside of its own basin (in this case, the Atl/EPac/SAtl basin) and the global range.
Category | Sortkey | Code |
---|---|---|
cat3 | 80,030 | {{#invoke:Storm categories|sortkey|cat3}}
|
cat1 | 80,010 | {{#invoke:Storm categories|sortkey|cat1}}
|
cat5 | 80,050 | {{#invoke:Storm categories|sortkey|cat5}}
|
cat4 | 80,040 | {{#invoke:Storm categories|sortkey|cat4}}
|
depression | 90 | {{#invoke:Storm categories|sortkey|depression}}
|
cat2 | 80,020 | {{#invoke:Storm categories|sortkey|cat2}}
|
Sorting table which uses different basins
| ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Icon
Icons exist for some Storm categories for presentation purposes. This function is available as a template at {{storm icon}}. p.icon
will return wikitext of an image or formatted text.
Full list of available values
The following table is generated by invoking the demo
function of this module. Some IDs are only available as colors or icons because they existed as parameters on old non-module template implementations and cannot be feasibly aliased to a specific tropical cyclone category.
It will show any color errors, including colors which aren't compliant with the minimal Web Content Accessibility Guidelines 2.0 AA color standards (see MOS:COLOR for more information).
Legend
Icon | ID | Name | Color | Sortkey | |||
---|---|---|---|---|---|---|---|
Basin | Name | Basin | Sortkey | ||||
atmosriv1 | Category 1: Weak (Atmospheric river) | #FFFFD9 | Atl/EPac/SAtl | 81200 | |||
atmosriv2 | Category 2: Moderate (Atmospheric river) | #FFD98C | Atl/EPac/SAtl | 81201 | |||
atmosriv3 | Category 3: Strong (Atmospheric river) | #FF9E59[W 1] | Atl/EPac/SAtl | 81202 | |||
atmosriv4 | Category 4: Extreme (Atmospheric river) | #FF738A[W 1] | Atl/EPac/SAtl | 81203 | |||
atmosriv5 | Category 5: Exceptional (Atmospheric river) | #A188FC[W 1] | Atl/EPac/SAtl | 81204 | |||
aus1 | Category 1 tropical cyclone | #4DFFFF | Aus/Fiji | 40006 | |||
aus2 | Category 2 tropical cyclone | #C0FFC0 | Aus/Fiji | 40008 | |||
aus3 | Category 3 severe tropical cyclone | #FFD98C | Aus/Fiji | 40010 | |||
aus4 | Category 4 severe tropical cyclone | #FF738A[W 1] | Aus/Fiji | 40013 | |||
aus5 | Category 5 severe tropical cyclone | #A188FC[W 1] | Aus/Fiji | 40015 | |||
beaufort0 | Calm (Force 0) | #FFFFFF | Global | 1500 | |||
beaufort1 | Light Air (Force 1) | #757575[W 1][W 2] | Global | 1510 | |||
beaufort10 | Storm (Force 10) | #C0FFC0 | Global | 1600 | |||
beaufort11 | Violent Storm (Force 11) | #E0FFCD | Global | 1610 | |||
beaufort12 | Hurricane-force (Force 12) | #FFFFD9 | Global | 1620 | |||
beaufort2 | Light Breeze (Force 2) | #909090[W 1] | Global | 1520 | |||
beaufort3 | Gentle Breeze (Force 3) | #B7B7B7[W 1] | Global | 1530 | |||
beaufort4 | Moderate Breeze (Force 4) | #D2D2D2 | Global | 1540 | |||
beaufort5 | Fresh Breeze (Force 5) | #F1F1F1 | Global | 1550 | |||
beaufort6 | Strong Breeze (Force 6) | #1591DE[W 1] | Global | 1560 | |||
beaufort7 | Near Gale (Force 7) | #6EC1EA[W 1] | Global | 1570 | |||
beaufort8 | Gale (Force 8) | #5EE0F5 | Global | 1580 | |||
beaufort9 | Strong Gale (Force 9) | #4DFFFF | Global | 1590 | |||
cat1 | atl | Category 1 hurricane | #FFFFD9 | Atl/EPac/SAtl | 80010 | ||
default | Category 1-equivalent tropical cyclone | ||||||
epac | Category 1 hurricane | ||||||
satl | Category 1-equivalent hurricane | ||||||
wpac | Category 1-equivalent typhoon | ||||||
cat2 | atl | Category 2 hurricane | #FFD98C | Atl/EPac/SAtl | 80020 | ||
default | Category 2-equivalent tropical cyclone | ||||||
epac | Category 2 hurricane | ||||||
satl | Category 2-equivalent hurricane | ||||||
wpac | Category 2-equivalent typhoon | ||||||
cat3 | atl | Category 3 major hurricane | #FF9E59[W 1] | Atl/EPac/SAtl | 80030 | ||
default | Category 3-equivalent tropical cyclone | ||||||
epac | Category 3 major hurricane | ||||||
satl | Category 3-equivalent hurricane | ||||||
wpac | Category 3-equivalent typhoon | ||||||
cat4 | atl | Category 4 major hurricane | #FF738A[W 1] | Atl/EPac/SAtl | 80040 | ||
default | Category 4-equivalent tropical cyclone | ||||||
epac | Category 4 major hurricane | ||||||
satl | Category 4-equivalent hurricane | ||||||
wpac | Category 4-equivalent typhoon | ||||||
cat5 | atl | Category 5 major hurricane | #A188FC[W 1] | Atl/EPac/SAtl | 80050 | ||
default | Category 5-equivalent tropical cyclone | ||||||
epac | Category 5 major hurricane | ||||||
satl | Category 5-equivalent hurricane | ||||||
wpac | Category 5-equivalent super typhoon | ||||||
criticalr | Critical Risk | #FF738A[W 1] | Atl/EPac/SAtl | 84101 | |||
criticalrisk | Critical Risk | #FF738A[W 1] | Atl/EPac/SAtl | 84101 | |||
cs | Cyclonic storm | #4DFFFF | NIO | 50006 | |||
cyclstorm | Cyclonic storm | #4DFFFF | NIO | 50006 | |||
d | Tropical depression | #1591de[1][W 1] | Global | 90 | |||
TC | d0 | Abnormally Dry | #FFFFD9 | Atl/EPac/SAtl | 81100 | ||
TC | d1 | Moderate Drought | #FFD98C | Atl/EPac/SAtl | 81101 | ||
TC | d2 | Severe Drought | #FF9E59[W 1] | Atl/EPac/SAtl | 81102 | ||
TC | d3 | Extreme Drought | #FF738A[W 1] | Atl/EPac/SAtl | 81103 | ||
TC | d4 | Exceptional Drought | #A188FC[W 1] | Atl/EPac/SAtl | 81104 | ||
dd | Deep depression | #6EC1EA[W 1] | NIO | 50002 | |||
deepdepression | Deep depression | #6EC1EA[W 1] | NIO | 50002 | |||
depression | Tropical depression | #6EC1EA[W 1] | Global | 90 | |||
di | Tropical disturbance | #1591DE[W 1] | Global | 80 | |||
disturbance | Tropical disturbance | #1591DE[W 1] | Global | 80 | |||
TC | drought0 | Abnormally Dry | #FFFFD9 | Atl/EPac/SAtl | 81100 | ||
TC | drought1 | Moderate Drought | #FFD98C | Atl/EPac/SAtl | 81101 | ||
TC | drought2 | Severe Drought | #FF9E59[W 1] | Atl/EPac/SAtl | 81102 | ||
TC | drought3 | Extreme Drought | #FF738A[W 1] | Atl/EPac/SAtl | 81103 | ||
TC | drought4 | Exceptional Drought | #A188FC[W 1] | Atl/EPac/SAtl | 81104 | ||
ef0 | EF0 tornado | #4DFFFF | Global | 1000 | |||
ef1 | EF1 tornado | #FFFFD9 | Global | 1010 | |||
ef2 | EF2 tornado | #FFD98C | Global | 1020 | |||
ef3 | EF3 tornado | #FF9E59[W 1] | Global | 1030 | |||
ef4 | EF4 tornado | #FF738A[W 1] | Global | 1040 | |||
ef5 | EF5 tornado | #A188FC[W 1] | Global | 1050 | |||
efu | EFU tornado | #CCCCCC | Global | 1001 | |||
el | Extratropical low | #CCCCCC | Global | 50 | |||
elevatedr | Elevated Risk | #FF9E59[W 1] | Atl/EPac/SAtl | 84100 | |||
elevatedrisk | Elevated Risk | #FF9E59[W 1] | Atl/EPac/SAtl | 84100 | |||
enhancedrisk | Enhanced Risk | #FF9E59[W 1] | Atl/EPac/SAtl | 84003 | |||
enhr | Enhanced Risk | #FF9E59[W 1] | Atl/EPac/SAtl | 84003 | |||
TC | ensomen | ENSO Moderate El Nino | #D46356[W 1][W 2] | Global | 202 | ||
TC | ensomln | ENSO Moderate La Nina | #3A90D2[W 1] | Global | 206 | ||
TC | enson | ENSO Neutral | #ACACAC[W 1] | Global | 200 | ||
TC | ensosen | ENSO Strong El Nino | #E73E2B[W 1][W 2] | Global | 203 | ||
TC | ensosln | ENSO Strong La Nina | #0082E6[W 1][W 2] | Global | 205 | ||
TC | ensovsen | ENSO Very Strong El Nino | #FA1900[W 1][W 2] | Global | 204 | ||
TC | ensowen | ENSO Weak El Nino | #C18881[W 1] | Global | 201 | ||
TC | ensowln | ENSO Weak La Nina | #739EBF[W 1] | Global | 207 | ||
escs | Extremely severe cyclonic storm | #FF738A[W 1] | NIO | 50015 | |||
esvrcyclstorm | Extremely severe cyclonic storm | #FF738A[W 1] | NIO | 50015 | |||
et | Extratropical cyclone | #CCCCCC | Global | 50 | |||
ex | Extratropical cyclone | #CCCCCC | Global | 50 | |||
extratropical | Extratropical cyclone | #CCCCCC | Global | 50 | |||
extratropicallow | Extratropical low | #CCCCCC | Global | 50 | |||
extremer | Extreme risk | #A188FC[W 1] | Atl/EPac/SAtl | 84102 | |||
extremerisk | Extreme risk | #A188FC[W 1] | Atl/EPac/SAtl | 84102 | |||
f0 | Calm (Force 0) | #FFFFFF | Global | 1500 | |||
f1 | Light Air (Force 1) | #757575[W 1][W 2] | Global | 1510 | |||
f10 | Storm (Force 10) | #C0FFC0 | Global | 1600 | |||
f11 | Violent Storm (Force 11) | #E0FFCD | Global | 1610 | |||
f12 | Hurricane-force (Force 12) | #FFFFD9 | Global | 1620 | |||
f2 | Light Breeze (Force 2) | #909090[W 1] | Global | 1520 | |||
f3 | Gentle Breeze (Force 3) | #B7B7B7[W 1] | Global | 1530 | |||
f4 | Moderate Breeze (Force 4) | #D2D2D2 | Global | 1540 | |||
f5 | Fresh Breeze (Force 5) | #F1F1F1 | Global | 1550 | |||
f6 | Strong Breeze (Force 6) | #1591DE[W 1] | Global | 1560 | |||
f7 | Near Gale (Force 7) | #6EC1EA[W 1] | Global | 1570 | |||
f8 | Gale (Force 8) | #5EE0F5 | Global | 1580 | |||
f9 | Strong Gale (Force 9) | #4DFFFF | Global | 1590 | |||
fc | Funnel Cloud | #6EC1EA[W 1] | Global | 1201 | |||
fiji1 | Category 1 tropical cyclone | #4DFFFF | Aus/Fiji | 40006 | |||
fiji2 | Category 2 tropical cyclone | #C0FFC0 | Aus/Fiji | 40008 | |||
fiji3 | Category 3 severe tropical cyclone | #FFD98C | Aus/Fiji | 40010 | |||
fiji4 | Category 4 severe tropical cyclone | #FF738A[W 1] | Aus/Fiji | 40013 | |||
fiji5 | Category 5 severe tropical cyclone | #A188FC[W 1] | Aus/Fiji | 40015 | |||
TC | frostbite10 | US: Frostbite 10 mins | #FF738A[W 1] | Atl/EPac/SAtl | 83011 | ||
TC | frostbite30 | US: Frostbite 30 mins | #FFD98C | Atl/EPac/SAtl | 83012 | ||
TC | frostbite5 | US: Frostbite 5 mins | #A188FC[W 1] | Atl/EPac/SAtl | 83010 | ||
TC | frostbiten | US: Frostbite more than 30 mins/not possible | #FFFFD9 | Atl/EPac/SAtl | 83013 | ||
funnelcloud | Funnel Cloud | #6EC1EA[W 1] | Global | 1201 | |||
g1 | Minor Geomagnetic Storms | #FFFFD9 | Atl/EPac/SAtl | 82200 | |||
g2 | Moderate Geomagnetic Storms | #FFD98C | Atl/EPac/SAtl | 82201 | |||
g3 | Strong Geomagnetic Storms | #FF9E59[W 1] | Atl/EPac/SAtl | 82202 | |||
g4 | Severe Geomagnetic Storms | #FF738A[W 1] | Atl/EPac/SAtl | 82203 | |||
g5 | Extreme Geomagnetic Storms | #A188FC[W 1] | Atl/EPac/SAtl | 82204 | |||
geo1 | Minor Geomagnetic Storms | #FFFFD9 | Atl/EPac/SAtl | 82200 | |||
geo2 | Moderate Geomagnetic Storms | #FFD98C | Atl/EPac/SAtl | 82201 | |||
geo3 | Strong Geomagnetic Storms | #FF9E59[W 1] | Atl/EPac/SAtl | 82202 | |||
geo4 | Severe Geomagnetic Storms | #FF738A[W 1] | Atl/EPac/SAtl | 82203 | |||
geo5 | Extreme Geomagnetic Storms | #A188FC[W 1] | Atl/EPac/SAtl | 82204 | |||
TC | h1 | Category 1: Extremely Hot | #A188FC[W 1] | Atl/EPac/SAtl | 83004 | ||
TC | h2 | Category 2: Very Hot | #FF738A[W 1] | Atl/EPac/SAtl | 83003 | ||
TC | h3 | Category 3: Hot | #FF9E59[W 1] | Atl/EPac/SAtl | 83002 | ||
TC | h4 | Category 4: Very Warm | #FFD98C | Atl/EPac/SAtl | 83001 | ||
TC | heat1 | Category 1: Extremely Hot | #A188FC[W 1] | Atl/EPac/SAtl | 83004 | ||
TC | heat2 | Category 2: Very Hot | #FF738A[W 1] | Atl/EPac/SAtl | 83003 | ||
TC | heat3 | Category 3: Hot | #FF9E59[W 1] | Atl/EPac/SAtl | 83002 | ||
TC | heat4 | Category 4: Very Warm | #FFD98C | Atl/EPac/SAtl | 83001 | ||
TC | heatindex100f | ≥ 100F heat index | #FE1212[W 1][W 2] | Global | 2208 | ||
TC | heatindex110f | ≥ 110F heat index | #FE1284[W 1][W 2] | Global | 2209 | ||
TC | heatindex120f | ≥ 120F heat index | #FF7BC3[W 1] | Global | 2210 | ||
TC | heatindex130f | ≥ 130F heat index | #FFC1E3 | Global | 2211 | ||
TC | heatindex140f | ≥ 140F heat index | #FFD6ED | Global | 2212 | ||
TC | heatindex150f | ≥ 150F heat index | #FFEDF7 | Global | 2214 | ||
TC | heatindex160f | ≥ 160F heat index | #FFFFFF | Global | 2215 | ||
TC | heatindex30f | ≥ 30F heat index | #009614[W 1][W 2] | Global | 2201 | ||
TC | heatindex30fb | < 30F heat index | #aedff9 | Global | 2200 | ||
TC | heatindex40f | ≥ 40F heat index | #96df00 | Global | 2202 | ||
TC | heatindex50f | ≥ 50F heat index | #c5ee03 | Global | 2203 | ||
TC | heatindex60f | ≥ 60F heat index | #ffff00 | Global | 2204 | ||
TC | heatindex70f | ≥ 70F heat index | #ffc502 | Global | 2205 | ||
TC | heatindex80f | ≥ 80F heat index | #ff9606[W 1] | Global | 2206 | ||
TC | heatindex90f | ≥ 90F heat index | #FF5500[W 1] | Global | 2207 | ||
TC | heatw | Warm | #FFFFD9 | Atl/EPac/SAtl | 83000 | ||
highr | High Risk | #A188FC[W 1] | Atl/EPac/SAtl | 84005 | |||
highrisk | High Risk | #A188FC[W 1] | Atl/EPac/SAtl | 84005 | |||
TC | hw | Warm | #FFFFD9 | Atl/EPac/SAtl | 83000 | ||
ice0 | Ice Damage Index: 0 | #4DFFFF | Atl/EPac/SAtl | 80300 | |||
ice1 | Ice Damage Index: 1 | #FFFFD9 | Atl/EPac/SAtl | 80301 | |||
ice2 | Ice Damage Index: 2 | #FFD98C | Atl/EPac/SAtl | 80302 | |||
ice3 | Ice Damage Index: 3 | #FF9E59[W 1] | Atl/EPac/SAtl | 80303 | |||
ice4 | Ice Damage Index: 4 | #FF738A[W 1] | Atl/EPac/SAtl | 80304 | |||
ice5 | Ice Damage Index: 5 | #A188FC[W 1] | Atl/EPac/SAtl | 80305 | |||
if0 | IF0 tornado | #4DFFFF | Global | 1102 | |||
if0m | IF0- tornado | #58EBF8 | Global | 1101 | |||
if0p | IF0+ tornado | #89FFF3 | Global | 1103 | |||
if1 | IF1 tornado | #FFFFD9 | Global | 1105 | |||
if1m | IF1- tornado | #C4FFE6 | Global | 1104 | |||
if1p | IF1+ tornado | #FFF2BF | Global | 1106 | |||
if2 | IF2 tornado | #FFD98C | Global | 1108 | |||
if2m | IF2- tornado | #FFE5A5 | Global | 1107 | |||
if2p | IF2+ tornado | #FFC57B | Global | 1109 | |||
if3 | IF3 tornado | #FF9E59[W 1] | Global | 1110 | |||
if4 | IF4 tornado | #FF738A[W 1] | Global | 1111 | |||
if5 | IF5 tornado | #A188FC[W 1] | Global | 1112 | |||
ifu | IFU tornado | #CCCCCC | Global | 1100 | |||
intense | Intense tropical cyclone | #FF738A[W 1] | SWIO | 30008 | |||
itc | Intense tropical cyclone | #FF738A[W 1] | SWIO | 30008 | |||
land | Land depression | #1591DE[W 1] | NIO | 50000 | |||
landdepression | Land depression | #1591DE[W 1] | NIO | 50000 | |||
ld | Land depression | #1591DE[W 1] | NIO | 50000 | |||
low | Tropical low | #6EC1EA[W 1] | Aus/Fiji | 40002 | |||
marginalrisk | Marginal Risk | #1BC800[W 1] | Atl/EPac/SAtl | 84001 | |||
md | Monsoon depression | #6EC1EA[W 1] | Global | 30 | |||
mdtr | Moderate Risk | #FF738A[W 1] | Atl/EPac/SAtl | 84004 | |||
TC | moddepression | Moderate tropical depression | #6EC1EA[W 1] | Global | 95 | ||
moderaterisk | Moderate Risk | #FF738A[W 1] | Atl/EPac/SAtl | 84004 | |||
monsoondepression | Monsoon depression | #6EC1EA[W 1] | Global | 30 | |||
mrglr | Marginal Risk | #1BC800[W 1] | Atl/EPac/SAtl | 84001 | |||
mstorm | Moderate tropical storm | #4DFFFF | SWIO | 30004 | |||
mts | Moderate tropical storm | #4DFFFF | SWIO | 30004 | |||
mtstorm | Moderate tropical storm | #4DFFFF | Global | 105 | |||
niocyclone | Cyclonic storm | #4DFFFF | NIO | 50006 | |||
niodepression | Depression | #1591DE[W 1] | NIO | 50001 | |||
nioland | Land depression | #1591DE[W 1] | NIO | 50000 | |||
nwpdepression | Tropical depression | #6EC1EA[W 1] | Global | 90 | |||
nwpsevere | Severe tropical storm | #C0FFC0 | Global | 120 | |||
nwpstorm | Tropical storm | #4DFFFF | Global | 100 | |||
od | Overland depression | #6EC1EA[W 1] | Global | 60 | |||
overland | Overland depression | #6EC1EA[W 1] | Global | 60 | |||
overlanddepression | Overland depression | #6EC1EA[W 1] | Global | 60 | |||
TC | p1 | Extremely moist | #1BC800[W 1] | Atl/EPac/SAtl | 81006 | ||
TC | p2 | Very Moist | #5FFF46 | Atl/EPac/SAtl | 81005 | ||
TC | p3 | Moderately Moist | #A9FEC4 | Atl/EPac/SAtl | 81004 | ||
TC | p4 | Near Normal | #FFFFFF | Atl/EPac/SAtl | 81003 | ||
TC | p5 | Moderate Drought | #FFB3B0 | Atl/EPac/SAtl | 81002 | ||
TC | p6 | Severe Drought | #FF5A55[W 1] | Atl/EPac/SAtl | 81001 | ||
TC | p7 | Extreme Drought | #FF0800[W 1][W 2] | Atl/EPac/SAtl | 81000 | ||
TC | palmer1 | Extremely moist | #1BC800[W 1] | Atl/EPac/SAtl | 81006 | ||
TC | palmer2 | Very Moist | #5FFF46 | Atl/EPac/SAtl | 81005 | ||
TC | palmer3 | Moderately Moist | #A9FEC4 | Atl/EPac/SAtl | 81004 | ||
TC | palmer4 | Near Normal | #FFFFFF | Atl/EPac/SAtl | 81003 | ||
TC | palmer5 | Moderate Drought | #FFB3B0 | Atl/EPac/SAtl | 81002 | ||
TC | palmer6 | Severe Drought | #FF5A55[W 1] | Atl/EPac/SAtl | 81001 | ||
TC | palmer7 | Extreme Drought | #FF0800[W 1][W 2] | Atl/EPac/SAtl | 81000 | ||
post | Post-tropical depression | #CCCCCC | Global | 70 | |||
posttropical | Post-tropical depression | #CCCCCC | Global | 70 | |||
potential | Potential tropical cyclone | #1591DE[W 1] | Global | 25 | |||
potentialtropicalcyclone | Potential tropical cyclone | #1591DE[W 1] | Global | 25 | |||
pt | Potential tropical cyclone | #1591DE[W 1] | Global | 25 | |||
TC | r1 | Minor Radio Blackout | #FFFFD9 | Atl/EPac/SAtl | 82000 | ||
TC | r2 | Moderate Radio Blackout | #FFD98C | Atl/EPac/SAtl | 82001 | ||
TC | r3 | Strong Radio Blackout | #FF9E59[W 1] | Atl/EPac/SAtl | 82002 | ||
TC | r4 | Severe Radio Blackout | #FF738A[W 1] | Atl/EPac/SAtl | 82003 | ||
TC | r5 | Extreme Radio Blackout | #A188FC[W 1] | Atl/EPac/SAtl | 82004 | ||
TC | radio1 | Minor Radio Blackout | #FFFFD9 | Atl/EPac/SAtl | 82000 | ||
TC | radio2 | Moderate Radio Blackout | #FFD98C | Atl/EPac/SAtl | 82001 | ||
TC | radio3 | Strong Radio Blackout | #FF9E59[W 1] | Atl/EPac/SAtl | 82002 | ||
TC | radio4 | Severe Radio Blackout | #FF738A[W 1] | Atl/EPac/SAtl | 82003 | ||
TC | radio5 | Extreme Radio Blackout | #A188FC[W 1] | Atl/EPac/SAtl | 82004 | ||
redflag0 | RFTI NIL | #4DFFFF | Atl/EPac/SAtl | 83100 | |||
redflag1 | RFTI Elevated | #FFFFD9 | Atl/EPac/SAtl | 83101 | |||
redflag3 | RFTI Critical-low | #FFD98C | Atl/EPac/SAtl | 83102 | |||
redflag5 | RFTI Critical-High | #FF9E59[W 1] | Atl/EPac/SAtl | 83103 | |||
redflag7 | RFTI Extremely Critical | #FF738A[W 1] | Atl/EPac/SAtl | 83104 | |||
redflag9 | RFTI Historically critical | #A188FC[W 1] | Atl/EPac/SAtl | 83004 | |||
redflagcrh | RFTI Critical-High | #FF9E59[W 1] | Atl/EPac/SAtl | 83103 | |||
redflagcrl | RFTI Critical-low | #FFD98C | Atl/EPac/SAtl | 83102 | |||
redflagecr | RFTI Extremely Critical | #FF738A[W 1] | Atl/EPac/SAtl | 83104 | |||
redflagelv | RFTI Elevated | #FFFFD9 | Atl/EPac/SAtl | 83101 | |||
redflaghcr | RFTI Historically critical | #A188FC[W 1] | Atl/EPac/SAtl | 83004 | |||
redflagnil | RFTI NIL | #4DFFFF | Atl/EPac/SAtl | 83100 | |||
remnant | Post-tropical depression | #CCCCCC | Global | 70 | |||
remnantlow | Post-tropical depression | #CCCCCC | Global | 70 | |||
rfti0 | RFTI NIL | #4DFFFF | Atl/EPac/SAtl | 83100 | |||
rfti1 | RFTI Elevated | #FFFFD9 | Atl/EPac/SAtl | 83101 | |||
rfti3 | RFTI Critical-low | #FFD98C | Atl/EPac/SAtl | 83102 | |||
rfti5 | RFTI Critical-High | #FF9E59[W 1] | Atl/EPac/SAtl | 83103 | |||
rfti7 | RFTI Extremely Critical | #FF738A[W 1] | Atl/EPac/SAtl | 83104 | |||
rfti9 | RFTI Historically critical | #A188FC[W 1] | Atl/EPac/SAtl | 83004 | |||
rl | Post-tropical depression | #CCCCCC | Global | 70 | |||
rsi0 | Category 0 "Nuisance" | #CCCCCC | Atl/EPac/SAtl | 80100 | |||
rsi1 | Category 1 "Notable" | #FFFFD9 | Atl/EPac/SAtl | 80110 | |||
rsi2 | Category 2 "Minor" | #FFD98C | Atl/EPac/SAtl | 80120 | |||
rsi3 | Category 3 "Major" | #FF9E59[W 1] | Atl/EPac/SAtl | 80130 | |||
rsi4 | Category 4 "Crippling" | #FF738A[W 1] | Atl/EPac/SAtl | 80140 | |||
rsi5 | Category 5 "Extreme" | #A188FC[W 1] | Atl/EPac/SAtl | 80150 | |||
rsicrippling | Category 4 "Crippling" | #FF738A[W 1] | Atl/EPac/SAtl | 80140 | |||
rsiextreme | Category 5 "Extreme" | #A188FC[W 1] | Atl/EPac/SAtl | 80150 | |||
rsimajor | Category 3 "Major" | #FF9E59[W 1] | Atl/EPac/SAtl | 80130 | |||
rsiminor | Category 2 "Minor" | #FFD98C | Atl/EPac/SAtl | 80120 | |||
rsinotable | Category 1 "Notable" | #FFFFD9 | Atl/EPac/SAtl | 80110 | |||
rsinuisance | Category 0 "Nuisance" | #CCCCCC | Atl/EPac/SAtl | 80100 | |||
TC | s1 | Minor Solar Radiation Storms | #FFFFD9 | Atl/EPac/SAtl | 82100 | ||
TC | s2 | Moderate Solar Radiation Storms | #FFD98C | Atl/EPac/SAtl | 82101 | ||
TC | s3 | Strong Solar Radiation Storms | #FF9E59[W 1] | Atl/EPac/SAtl | 82102 | ||
TC | s4 | Severe Solar Radiation Storms | #FF738A[W 1] | Atl/EPac/SAtl | 82103 | ||
TC | s5 | Extreme Solar Radiation Storms | #A188FC[W 1] | Atl/EPac/SAtl | 82104 | ||
scs | Severe cyclonic storm | #C0FFC0 | NIO | 50008 | |||
sd | Subtropical depression | #6EC1EA[W 1] | Global | 62 | |||
severe | Severe tropical storm | #C0FFC0 | Global | 120 | |||
TC | severedep | Severe tropical depression | #6EC1EA[W 1] | Global | 120 | ||
severets | Severe tropical storm | #C0FFC0 | Global | 120 | |||
shdepression | Tropical depression | #6EC1EA[W 1] | Global | 90 | |||
TC | shem1 | Tropical cyclone | #4DFFFF | Historical | 20008 | ||
TC | shem2 | Tropical cyclone | #C0FFC0 | Historical | 20008 | ||
TC | shem3 | Tropical cyclone | #FFD98C | SWIO | 30006 | ||
TC | shem4 | Tropical cyclone | #FFD98C | Historical | 20008 | ||
TC | shem5 | Severe tropical cyclone | #A188FC[W 1] | Historical | 20010 | ||
shemdepression | Tropical depression | #6EC1EA[W 1] | Global | 90 | |||
TC | shemsvrtc | Severe tropical cyclone | #FFD98C | Historical | 20020 | ||
TC | shemtc | Tropical cyclone | #FFD98C | SWIO | 30006 | ||
slgtr | Slight Risk | #FFD98C | Atl/EPac/SAtl | 84002 | |||
slightrisk | Slight Risk | #FFD98C | Atl/EPac/SAtl | 84002 | |||
TC | solar1 | Minor Solar Radiation Storms | #FFFFD9 | Atl/EPac/SAtl | 82100 | ||
TC | solar2 | Moderate Solar Radiation Storms | #FFD98C | Atl/EPac/SAtl | 82101 | ||
TC | solar3 | Strong Solar Radiation Storms | #FF9E59[W 1] | Atl/EPac/SAtl | 82102 | ||
TC | solar4 | Severe Solar Radiation Storms | #FF738A[W 1] | Atl/EPac/SAtl | 82103 | ||
TC | solar5 | Extreme Solar Radiation Storms | #A188FC[W 1] | Atl/EPac/SAtl | 82104 | ||
spdepression | Tropical depression | #6EC1EA[W 1] | Global | 90 | |||
spia0 | Ice Damage Index: 0 | #4DFFFF | Atl/EPac/SAtl | 80300 | |||
spia1 | Ice Damage Index: 1 | #FFFFD9 | Atl/EPac/SAtl | 80301 | |||
spia2 | Ice Damage Index: 2 | #FFD98C | Atl/EPac/SAtl | 80302 | |||
spia3 | Ice Damage Index: 3 | #FF9E59[W 1] | Atl/EPac/SAtl | 80303 | |||
spia4 | Ice Damage Index: 4 | #FF738A[W 1] | Atl/EPac/SAtl | 80304 | |||
spia5 | Ice Damage Index: 5 | #A188FC[W 1] | Atl/EPac/SAtl | 80305 | |||
sprcyclstorm | Super cyclonic storm | #A188FC[W 1] | NIO | 50020 | |||
ss | Subtropical storm | #4DFFFF | Global | 65 | |||
storm | Tropical storm | #4DFFFF | Global | 100 | |||
strong | Severe tropical storm | #C0FFC0 | Global | 120 | |||
sts | Severe tropical storm | #C0FFC0 | Global | 120 | |||
sty | Category 4-equivalent super typhoon | #FF738A[W 1] | Atl/EPac/SAtl | 80045 | |||
TC | styphoon | Supertyphoon | #A188FC[W 1] | WPAC | 60050 | ||
sub | Moderate tropical storm | #4DFFFF | SWIO | 30004 | |||
subdepression | Subtropical depression | #6EC1EA[W 1] | Global | 62 | |||
subdisturbance | Subtropical disturbance | #1591DE[W 1] | Global | 55 | |||
TC | sublow | Subtropical low | #6EC1EA[W 1] | Aus/Fiji | 40000 | ||
subtropical | Subtropical storm | #4DFFFF | Global | 65 | |||
TC | subtropicalcyclone | Subtropical cyclone | #4DFFFF | Global | 70 | ||
sucs | Super cyclonic storm | #A188FC[W 1] | NIO | 50020 | |||
supertyphoon | Category 4-equivalent super typhoon | #FF738A[W 1] | Atl/EPac/SAtl | 80045 | |||
svrcyclstorm | Severe cyclonic storm | #C0FFC0 | NIO | 50008 | |||
TC | svtyphoon | Severe typhoon | #FF738A[W 1] | WPAC | 60015 | ||
swiodepression | Tropical depression | #6EC1EA[W 1] | Global | 90 | |||
swiodisturbance | Tropical disturbance | #1591DE[W 1] | Global | 80 | |||
[2] | swiosts | Severe tropical storm | #C0FFC0 | Global | 120 | ||
[3] | swiotc | Tropical cyclone | #FFD98C | SWIO | 30006 | ||
swsubdep | Subtropical depression | #6EC1EA[W 1] | Global | 62 | |||
t0 | T0 tornado | #5EE0F5 | Global | 1202 | |||
t1 | T1 tornado | #4DFFFF | Global | 1203 | |||
t10 | T10 tornado | #D07EC3[W 1] | Global | 1212 | |||
t11 | T11 tornado | #A188FC[W 1] | Global | 1213 | |||
t2 | T2 tornado | #A6FFEC | Global | 1204 | |||
t3 | T3 tornado | #FFFFD9 | Global | 1205 | |||
t4 | T4 tornado | #FFECB3 | Global | 1206 | |||
t5 | T5 tornado | #FFD98C | Global | 1207 | |||
t6 | T6 tornado | #FFBC73 | Global | 1208 | |||
t7 | T7 tornado | #FF9E59[W 1] | Global | 1209 | |||
t8 | T8 tornado | #FF8972[W 1] | Global | 1210 | |||
t9 | T9 tornado | #FF738A[W 1] | Global | 1211 | |||
[3] | tc | Tropical cyclone | #FFD98C | SWIO | 30006 | ||
td | Tropical depression | #6EC1EA[W 1] | Global | 90 | |||
tdist | Tropical disturbance | #1591DE[W 1] | Global | 80 | |||
TC | temp0c | ≥ 0C temperature | #009614[W 1][W 2] | Global | 2015 | ||
TC | temp10c | ≥ 10C temperature | #c5ee03 | Global | 2017 | ||
TC | temp10cn | ≥ -10C temperature | #19c5ff[W 1] | Global | 2013 | ||
TC | temp15c | ≥ 15C temperature | #ffff00 | Global | 2018 | ||
TC | temp15cn | ≥ -15C temperature | #1e96f8[W 1] | Global | 2012 | ||
TC | temp20c | ≥ 20C temperature | #ffc502 | Global | 2019 | ||
TC | temp20cn | ≥ -20C temperature | #716EEE[W 1][W 2] | Global | 2011 | ||
TC | temp25c | ≥ 25C temperature | #ff9606[W 1] | Global | 2020 | ||
TC | temp25cn | ≥ -25C temperature | #9F6FD2[W 1][W 2] | Global | 2010 | ||
TC | temp30c | ≥ 30C temperature | #FF5500[W 1] | Global | 2021 | ||
TC | temp30cn | ≥ -30C temperature | #CEA8E7[W 1] | Global | 2009 | ||
TC | temp35c | ≥ 35C temperature | #FE1212[W 1][W 2] | Global | 2022 | ||
TC | temp35cn | ≥ -35C temperature | #FEE9FF | Global | 2008 | ||
TC | temp40c | ≥ 40C temperature | #FE1284[W 1][W 2] | Global | 2023 | ||
TC | temp40cn | ≥ -40C temperature | #FFFFFF | Global | 2007 | ||
TC | temp45c | ≥ 45C temperature | #FF7BC3[W 1] | Global | 2024 | ||
TC | temp45cn | ≥ -45C temperature | #DCDCDC | Global | 2006 | ||
TC | temp50c | ≥ 50C temperature | #FFC1E3 | Global | 2025 | ||
TC | temp50cn | ≥ -50C temperature | #BEBEBE | Global | 2005 | ||
TC | temp55c | ≥ 55C temperature | #FFD6ED | Global | 2026 | ||
TC | temp55cn | ≥ -55C temperature | #868686[W 1][W 2] | Global | 2004 | ||
TC | temp5c | ≥ 5C temperature | #96df00 | Global | 2016 | ||
TC | temp5cn | ≥ -5C temperature | #aedff9 | Global | 2014 | ||
TC | temp60cn | ≥ -60C temperature | #FAD6EB | Global | 2003 | ||
TC | temp65cn | ≥ -65C temperature | #DCAAC2[W 1] | Global | 2002 | ||
TC | temp70cn | ≥ -70C temperature | #CB83A5[W 1] | Global | 2001 | ||
TC | tempb70cn | < -70C temperature | #B7698E[W 1][W 2] | Global | 2000 | ||
thunderstorm | T-storm | #A9FEC4 | Atl/EPac/SAtl | 84000 | |||
tl | Tropical low | #6EC1EA[W 1] | Aus/Fiji | 40002 | |||
torro0 | T0 tornado | #5EE0F5 | Global | 1202 | |||
torro1 | T1 tornado | #4DFFFF | Global | 1203 | |||
torro10 | T10 tornado | #D07EC3[W 1] | Global | 1212 | |||
torro11 | T11 tornado | #A188FC[W 1] | Global | 1213 | |||
torro2 | T2 tornado | #A6FFEC | Global | 1204 | |||
torro3 | T3 tornado | #FFFFD9 | Global | 1205 | |||
torro4 | T4 tornado | #FFECB3 | Global | 1206 | |||
torro5 | T5 tornado | #FFD98C | Global | 1207 | |||
torro6 | T6 tornado | #FFBC73 | Global | 1208 | |||
torro7 | T7 tornado | #FF9E59[W 1] | Global | 1209 | |||
torro8 | T8 tornado | #FF8972[W 1] | Global | 1210 | |||
torro9 | T9 tornado | #FF738A[W 1] | Global | 1211 | |||
torrou | TU tornado | #CCCCCC | Global | 1200 | |||
TC | tropicalcyclone | Tropical cyclone | #FFD98C | SWIO | 30006 | ||
ts | Tropical storm | #4DFFFF | Global | 100 | |||
tstm | T-storm | #A9FEC4 | Atl/EPac/SAtl | 84000 | |||
tstorm | T-storm | #A9FEC4 | Atl/EPac/SAtl | 84000 | |||
tu | TU tornado | #CCCCCC | Global | 1200 | |||
ty | Typhoon | #FFD98C | WPAC | 60010 | |||
typhoon | Typhoon | #FFD98C | WPAC | 60010 | |||
? | unknown | Unknown-strength storm | #C0C0C0 | Global | 0 | ||
vintense | Very intense tropical cyclone | #A188FC[W 1] | SWIO | 30010 | |||
vitc | Very intense tropical cyclone | #A188FC[W 1] | SWIO | 30010 | |||
vity | Violent typhoon | #A188FC[W 1] | WPAC | 60030 | |||
vityphoon | Violent typhoon | #A188FC[W 1] | WPAC | 60030 | |||
vscs | Very severe cyclonic storm | #FFD98C | NIO | 50010 | |||
vstrtyphoon | Very strong typhoon | #FF738A[W 1] | WPAC | 60020 | |||
vsty | Very strong typhoon | #FF738A[W 1] | WPAC | 60020 | |||
vstyphoon | Very strong typhoon | #FF738A[W 1] | WPAC | 60020 | |||
vsvrcyclstorm | Very severe cyclonic storm | #FFD98C | NIO | 50010 | |||
TC | windchill0f | ≥ 0F wind chill | #716EEE[W 1][W 2] | Global | 2111 | ||
TC | windchill100fn | ≥ -100F wind chill | #CB83A5[W 1] | Global | 2101 | ||
TC | windchill10f | ≥ 10F wind chill | #1e96f8[W 1] | Global | 2112 | ||
TC | windchill10fn | ≥ -10F wind chill | #9F6FD2[W 1][W 2] | Global | 2110 | ||
TC | windchill20f | ≥ 20F wind chill | #19c5ff[W 1] | Global | 2113 | ||
TC | windchill20fn | ≥ -20F wind chill | #CEA8E7[W 1] | Global | 2109 | ||
TC | windchill30f | ≥ 30F wind chill | #aedff9 | Global | 2114 | ||
TC | windchill30fn | ≥ -30F wind chill | #FEE9FF | Global | 2108 | ||
TC | windchill40f | ≥ 40F wind chill | #009614[W 1][W 2] | Global | 2115 | ||
TC | windchill40fn | ≥ -40F wind chill | #FFFFFF | Global | 2107 | ||
TC | windchill50f | ≥ 50F wind chill | #96df00 | Global | 2116 | ||
TC | windchill50fn | ≥ -50F wind chill | #DCDCDC | Global | 2106 | ||
TC | windchill60f | ≥ 60F wind chill | #c5ee03 | Global | 2117 | ||
TC | windchill60fn | ≥ -60F wind chill | #BEBEBE | Global | 2105 | ||
TC | windchill70fn | ≥ -70F wind chill | #868686[W 1][W 2] | Global | 2104 | ||
TC | windchill80fn | ≥ -80F wind chill | #FAD6EB | Global | 2103 | ||
TC | windchill90fn | ≥ -90F wind chill | #DCAAC2[W 1] | Global | 2102 | ||
TC | windchillb100fn | ≤ -100F wind chill | #B7698E[W 1][W 2] | Global | 2100 | ||
TC | windchillextreme | Canada: extreme windchill risk | #A188FC[W 1] | Atl/EPac/SAtl | 83025 | ||
TC | windchillhigh | Canada: high windchill risk | #FFD98C | Atl/EPac/SAtl | 83022 | ||
TC | windchilllow | Canada: low windchill risk | #4DFFFF | Atl/EPac/SAtl | 83020 | ||
TC | windchillmoderate | Canada: moderate windchill risk | #FFFFD9 | Atl/EPac/SAtl | 83021 | ||
TC | windchillsevere | Canada: severe windchill risk | #FF738A[W 1] | Atl/EPac/SAtl | 83024 | ||
TC | windchillveryhigh | Canada: very high windchill risk | #FF9E59[W 1] | Atl/EPac/SAtl | 83023 | ||
TC | wssi0 | No impacts | #CCCCCC | Atl/EPac/SAtl | 80200 | ||
TC | wssi1 | Limited impacts | #1591DE[W 1] | Atl/EPac/SAtl | 80210 | ||
TC | wssi2 | Minor impacts | #FFFFD9 | Atl/EPac/SAtl | 80220 | ||
TC | wssi3 | Moderate impacts | #FF9E59[W 1] | Atl/EPac/SAtl | 80230 | ||
TC | wssi4 | Major impacts | #FF738A[W 1] | Atl/EPac/SAtl | 80240 | ||
TC | wssi5 | Extreme impacts | #A188FC[W 1] | Atl/EPac/SAtl | 80250 | ||
TC | wssiextreme | Extreme impacts | #A188FC[W 1] | Atl/EPac/SAtl | 80250 | ||
TC | wssilimited | Limited impacts | #1591DE[W 1] | Atl/EPac/SAtl | 80210 | ||
TC | wssimajor | Major impacts | #FF738A[W 1] | Atl/EPac/SAtl | 80240 | ||
TC | wssiminor | Minor impacts | #FFFFD9 | Atl/EPac/SAtl | 80220 | ||
TC | wssimoderate | Moderate impacts | #FF9E59[W 1] | Atl/EPac/SAtl | 80230 | ||
TC | wssinone | No impacts | #CCCCCC | Atl/EPac/SAtl | 80200 | ||
zodw | Zone of disturbed weather | #1591DE[W 1] | SWIO | 30000 | |||
1 | not available | #FFFFD9 | not available | ||||
2 | not available | #FFD98C | not available | ||||
3 | not available | #FF9E59[W 1] | not available | ||||
4 | not available | #FF738A[W 1] | not available | ||||
5 | not available | #A188FC[W 1] | not available | ||||
a1 | not available | #4DFFFF | not available | ||||
a2 | not available | #C0FFC0 | not available | ||||
a3 | not available | #FFD98C | not available | ||||
a4 | not available | #FF738A[W 1] | not available | ||||
a5 | not available | #A188FC[W 1] | not available | ||||
et2 | not available | ||||||
ex2 | not available | ||||||
extratropical2 | not available | ||||||
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.
- ^ a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp cq cr cs ct cu cv cw cx cy cz da db dc dd de df dg dh di dj dk dl dm dn do dp dq dr ds dt du dv dw dx dy dz ea eb ec ed ee ef eg eh ei ej ek el em en eo ep eq er es et eu ev ew ex ey ez fa fb fc fd fe ff fg fh fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx fy fz ga gb gc gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs gt gu gv gw gx gy gz ha hb hc hd he hf hg hh hi hj hk hl hm hn This color has contrast issues with links (not WCAG 2.0 AA-compatible). It should not be used in conjunction with a link.
- ^ a b c d e f g h i j k l m n o p q r s t u v w x 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.
local categoryData = require("Module:Storm categories/categories")
local colors = require("Module:Storm categories/colors").colors
local icons = require("Module:Storm categories/icons").icons
local cats = categoryData.cats
local defaultCategory = categoryData.defaultCategory
local p = {}
function p.color(frame)
return p._color(frame.args[1] or frame:getParent().args[1], false)
end
function p.name(frame)
return p._name(
frame.args[1] or frame:getParent().args[1],
frame.args[2] or frame:getParent().args[2],
false
)
end
function p.sortkey(frame)
return p._sortkey(frame.args[1] or frame:getParent().args[1], false)
end
function p.icon(frame)
return p._icon(frame.args[1] or frame:getParent().args[1], false)
end
function p.isEqual(frame)
return p._isEqual(
frame.args[1] or frame:getParent().args[1],
frame.args[2] or frame:getParent().args[2]
) and "yes" or ""
end
function p._normalizeId(category, fallback)
-- Normalize if normalizable, fall back to default if not.
return (category ~= nil and string.len(category) ~= 0) and
string.gsub(string.lower(category), "[^%w]", "") or fallback
end
function p._color(category, nilIfMissing)
-- This looks confusing, but it's actually nested ternaries (for nil checks)
local color = p._normalizeId(category, defaultCategory)
return colors[color] or ((cats[color] or (
nilIfMissing
and { color = nil }
or cats[defaultCategory]
)).color)
end
function p._name(category, basin, nilIfMissing)
local name_def = (cats[
p._normalizeId(category, defaultCategory)
] or (nilIfMissing and { name = nil } or cats[defaultCategory])).name
return type(name_def) == "table" and
(
name_def[string.lower(basin or "default")]
or name_def["default"]
or (not nilIfMissing and error("No default name for basin-based category name.") or nil)
)
or name_def
end
function p._sortkey(category, nilIfMissing)
-- This looks confusing, but it's actually nested ternaries (for nil checks)
return (cats[
p._normalizeId(category, defaultCategory)
] or (nilIfMissing and { sortkey = nil } or cats[defaultCategory])).sortkey
end
function p._icon(category, nilIfMissing)
-- This looks confusing, but it's actually nested ternaries (for nil checks)
local icon = p._normalizeId(category, defaultCategory)
return icons[icon] or (cats[icon] ~= nil and (
cats[icon].icon or cats["tropicalcyclone"].icon
) or (not nilIfMissing and cats[defaultCategory].icon) or nil)
end
function p._isEqual(category1, category2)
-- Checks if two IDs are equal.
-- An {{#ifeq}} check does not consider aliases. This function compares two
-- IDs in a way that considers category aliases. This works because alias
-- assignments are references to the actual table containing the category
-- info found in the main category table.
--
-- `false` will be returned if at least one of the categories are nil or
-- if the category is not defined.
local _category1 = p._normalizeId(category1)
local _category2 = p._normalizeId(category2)
return (_category1 == _category2 and _category1 ~= nil) or
cats[ _category1 ] == cats[ _category2 ] and
-- `false` if categories are undefined and not equal.
cats[ _category1 ] ~= nil
end
function p.demo(frame)
return require("Module:Storm categories/demo").demo(frame)
end
return p