UsageEdit

This template contains color overrides for Module:Storm categories. These color overrides can either add an extra color to the template without adding a category, or override the color of an existing category or category alias for backwards compatibility. Make sure that added colors are compatible with black at a bare minimum, or else Module:Storm categories/demo will display errors as a check. As much as possible, also make the colors comply with at least the WCAG's AA-level for contrast with links and visited links. Additional warnings are shown by the demo template for these.

Overrides are defined in the following format:

    -- For overrides that include the color of an existing category.
    ["override_id"] = cats["actual_category"].color,
    -- For overrides that introduce a new color.
    ["override_id"] = "ff80ff",

local p = {}
local cats = require("Module:Storm categories/categories").cats

-- Ambiguous color names. This is because the old {[storm colour}} itself is 
-- extremely ambiguous. This is also used to override the output of some codes.
local colors = {
	-- Basin colors
	["5"] = cats["cat5"].color,
	["4"] = cats["cat4"].color,
	["3"] = cats["cat3"].color,
	["2"] = cats["cat2"].color,
	["1"] = cats["cat1"].color,
	-- Depression
	["d"] = "80ccff",
	-- FMS scale
	["a5"] = cats["aus5"].color,
	["a4"] = cats["aus4"].color,
	["a3"] = cats["aus3"].color,
	["a2"] = cats["aus2"].color,
	["a1"] = cats["aus1"].color
}

p.colors = colors
return p