Changes

Pywikibot 6.4.0
<!--{{tl|Module rating |<!-- Values: pre-alpha • alpha • beta • release • protected -- If a rating not needed/relevant, delete this template call }}-->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Data source for [[:Module:Gridiron color]] and [[:Module:Gridiron color/sandbox]]

== Data format ==


=== Normal team formatting ===

<syntaxhighlight lang="lua">["team name"] = {"primary color", "secondary color", "tertiary color", "alternative primary", "alternative secondary"},</syntaxhighlight>

=== Teams with historical color schemes ===

Team with historical colors formatting (where XXXX represents the 4-digit start year and YYYY represents the 4-digit end year):

<syntaxhighlight lang="lua">
["team name"] = {"primary color", "secondary color", "tertiary color", "alternative primary", "alternative secondary",
{
["team name XXXXthruYYYY"] = {"primary color", "secondary color", "tertiary color", "alternative primary", "alternative secondary"},
["team name XXXXthruYYYY"] = "alternative team name",
["team name XXXXthruYYYY"] = "alternative team name XXXXthruYYYY"
}
},
</syntaxhighlight>

=== Team alternative name formatting ===

<syntaxhighlight lang="lua">["team alternative name"] = "team name",</syntaxhighlight>

=== Warnings ===

Do '''not''' create a historical color line that links back to the main team name, as in the <code>"Gridiron Team 1990thru2000"</code> line in the example below:

<syntaxhighlight lang="lua">
["Gridiron Team"] = {"#dcdcdc", "", "none", "", "",
{
["Gridiron Team 1990thru2000"] = "Gridiron Team"
["Gridiron Team 1980thru1990"] = {"#dcdcdc", "", "none", "", ""}
}
},
</syntaxhighlight>

This will create an infinite loop, and cause script errors and timeout errors on any pages that try to specify that team. The module will always use the current colors if a color for the specified year is not found, so any historical lines that are identical to the top-level color scheme can simply be deleted.

Also, remember to include the pound sign (#) with the hex codes when adding or changing colors, as in {{code|#dcdcdc}}. Some data modules don't require the pound sign.

== Test table ==
{{#ifeq:{{SUBPAGENAME}}|sandbox
|{{#invoke:Gridiron color/contrast|testtable|sport=data/sandbox}}
|{{#invoke:Gridiron color/contrast|testtable|sport=data}}
}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->

}}</includeonly>