Module:Swatches/doc
Jump to navigation
Jump to search
This is the documentation page for Module:Swatches
Module:Swatches
Lists cosmetic swatches from Module:Swatches/data and renders them using Template:SwatchInfobox.
The rendered infobox cards are wrapped in a flex container with the following styling: display:flex; flex-wrap:wrap; overflow-x:auto; align-items:flex-start; gap:1em;
Usage
List all swatches
If no scope is provided, all swatches in the dataset are shown:
{{#invoke:Swatches|list}}
List swatches for a scope page
Scope can be specified to show all swatches that are compatible with at least one item in that scope:
{{#invoke:Swatches|list|scope=<SCOPE>}}
List swatches for an item page
Item can additionally be specified to show only swatches that are compatible with that item:
{{#invoke:Swatches|list|scope=<SCOPE>|item=<ITEM>}}
Parameters
- scope (optional)
- Compatibility scope to filter swatches. Accepted values:
VehicleWeaponGarmentPlaceable
- item (optional)
- Name of item within the specified scope, to further filter swatch compatibility. This must match the item name used in
onlyItemstokens in Module:Swatches/data. {{PAGENAME}}can be used if the page title matches the dataset naming.
Notes
- Swatch compatibility rules are defined in Module:Swatches/data using the
scopesand optionalonlyItemsfields. - If
scopeis omitted,itemis ignored and all swatches are shown. - If a swatch uses
scopes={"All"}, it will appear for any scope/item filter.