Module:Sports color/basketball
Jump to navigation
Jump to search
This Lua module is used on approximately 20,000 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages. Consider discussing changes on the talk page before implementing them.
Transclusion count updated automatically (see documentation). |
This module is rated as ready for general use. It has reached a mature form and is thought to be 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. |
This is the data module used by Module:Sports color. Please test any changes in Module:Sports color/basketball/sandbox first.
Format
Most lines will be of the following form
["TEAM NAME"] = {"HEX1", "HEX2", "HEX3", "HEX4"},
The trailing comma is very important. Here, HEX1
, HEX2
, HEX3
, and HEX4
are hexadecimal color values.
To use the same color for more than one team name (e.g., if the team goes by more than one name, but the colors are the same), use
["SECONDARY TEAM NAME"] = "TEAM NAME",
where TEAM NAME
has already been defined, and SECONDARY TEAM NAME
is the alternative spelling, or name.
Warning
Be very careful when updating this module, as it is used in a large number of articles. Please test any changes in Module:Sports color/basketball/sandbox first.
Test table
The numeric columns are the calculated contrast ratio for the first/second and the fourth/third colors. Anything lower than 3 is very poor contrast and should be changed in the data module. For more information, see Template:Color contrast ratio.
["Pacific Caesar"] = {"#DEE94D", "#000000", "#008000", "#DEE94D"}
return {
-- NBA --
["{{wp|Atlanta Hawks}}"] = {"C8102E", "FFFFFF", "FDB927", "000000"},
["{{wp|St. Louis Hawks}}"] = {"CF0A2C", "FFFFFF", "003DA6", "FFFFFF"},
["{{wp|Milwaukee Hawks}}"] = {"CF0A2C", "FFFFFF", "003DA6", "FFFFFF"},
["{{wp|Tri-Cities Blackhawks}}"] = {"CF0A2C", "FFFFFF", "003DA6", "FFFFFF"},
["{{wp|Boston Celtics}}"] = {"008348", "FFFFFF", "BB9753", "000000"},
["{{wp|Brooklyn Nets}}"] = {"000000", "FFFFFF", "FFFFFF", "000000"},
["{{wp|New Jersey Nets}}"] = {"00285E", "FFFFFF", "CE1141", "FFFFFF"},
["{{wp|New York Nets}}"] = {"003DA6", "FFFFFF", "EC0044", "FFFFFF"},
["{{wp|New Jersey Americans}}"] = {"EC0044", "FFFFFF", "003DA6", "FFFFFF"},
["{{wp|Charlotte Hornets}}"] = {"00788C", "FFFFFF", "1D1160", "FFFFFF"},
["{{wp|Charlotte Bobcats}}"] = {"E75300", "000000", "3D6085", "FFFFFF"},
["{{wp|Charlotte Hornets (1988–2002)}}"] = {"283A97", "FFFFFF", "0391AB", "000000"},
["{{wp|Chicago Bulls}}"] = {"CE1141", "FFFFFF", "000000", "FFFFFF"},
["{{wp|Cleveland Cavaliers}}"] = {"860038", "FFFFFF", "BC945C", "000000"},
["{{wp|Dallas Mavericks}}"] = {"0064B1", "FFFFFF", "BBC4CA", "000000"},
["{{wp|Denver Nuggets}}"] = {"0E2240", "FFFFFF", "FEC524", "0E2240"},
["{{wp|Detroit Pistons}}"] = {"1D428A", "FFFFFF", "C8102E", "FFFFFF"},
["{{wp|Ft. Wayne Pistons}}"] = {"003DA6", "FFFFFF", "C3002F", "FFFFFF"},
["{{wp|Golden State Warriors}}"] = {"1D428A", "FFFFFF", "FDB927", "1D428A"},
["{{wp|San Francisco Warriors}}"] = {"006BB6", "FFFFFF", "FDB927", "000000"},
["{{wp|Philadelphia Warriors}}"] = {"003DA6", "FFFFFF", "ED174C", "FFFFFF"},
["{{wp|Houston Rockets}}"] = {"CE1141", "FFFFFF", "000000", "FFFFFF"},
["{{wp|San Diego Rockets}}"] = {"115E43", "FFFFFF", "FFC938", "115E43"},
["{{wp|Indiana Pacers}}"] = {"002D62", "FFFFFF", "FDBB30", "002D62"},
["{{wp|Los Angeles Clippers}}"] = {"1D428A", "FFFFFF", "C8102E", "FFFFFF"},
["{{wp|San Diego Clippers}}"] = {"3E8EDE", "000000", "E24301", "000000"},
["{{wp|Buffalo Braves}}"] = {"000000", "FFFFFF", "E75300", "000000"},
["{{wp|Los Angeles Lakers}}"] = {"31006F", "FFFFFF", "FDB927", "000000"},
["{{wp|Minneapolis Lakers}}"] = {"79A3DD", "000000", "F7C330", "000000"},
["{{wp|Memphis Grizzlies}}"] = {"5D76A9", "FFFFFF", "12173F", "FFFFFF"},
["{{wp|Vancouver Grizzlies}}"] = {"00ADA8", "000000", "BA7845", "000000"},
["{{wp|Miami Heat}}"] = {"000000", "FFFFFF", "98002E", "FFFFFF"},
["{{wp|Milwaukee Bucks}}"] = {"00471B", "FFFFFF", "EEE1C6", "00471B"},
["{{wp|Minnesota Timberwolves}}"] = {"0C233F", "FFFFFF", "266092", "FFFFFF"},
["{{wp|New Orleans Pelicans}}"] = {"0C2340", "FFFFFF", "B9975B", "0C2340"},
["{{wp|New Orleans Hornets}}"] = {"0093B1", "FFFFFF", "FDB927", "000000"},
["{{wp|New York Knicks}}"] = {"1D428A", "FFFFFF", "F58426", "000000"},
["{{wp|Oklahoma City Thunder}}"] = {"007AC1", "FFFFFF", "EF3B24", "FFFFFF"},
["{{wp|Seattle SuperSonics}}"] = {"006633", "FFFFFF", "FFBE00", "000000"},
["{{wp|Orlando Magic}}"] = {"0077C0", "FFFFFF", "000000", "FFFFFF"},
["{{wp|Philadelphia 76ers}}"] = {"1D428A", "FFFFFF", "C8102E", "FFFFFF"},
["{{wp|Syracuse Nationals}}"] = {"DD0031", "FFFFFF", "002E6D", "FFFFFF"},
["{{wp|Phoenix Suns}}"] = {"1D1160", "FFFFFF", "E56020", "000000"},
["{{wp|Portland Trail Blazers}}"] = {"000000", "FFFFFF", "E03A3E", "000000"},
["{{wp|Sacramento Kings}}"] = {"000000", "FFFFFF", "5A2D81", "FFFFFF"},
["{{wp|Kansas City Kings}}"] = {"1E3D92", "FFFFFF", "CE3320", "FFFFFF"},
["{{wp|Cincinnati Royals}}"] = {"1E3D92", "FFFFFF", "CE3320", "FFFFFF"},
["{{wp|Rochester Royals}}"] = {"1E3D92", "FFFFFF", "CE3320", "FFFFFF"},
["{{wp|San Antonio Spurs}}"] = {"000000", "FFFFFF", "C4CED4", "000000"},
["{{wp|Dallas Chaparrals}}"] = {"1149A5", "FFFFFF", "EF052A", "000000"},
["{{wp|Texas Chaparrals}}"] = "Dallas Chaparrals",
["{{wp|Toronto Raptors}}"] = {"CE1141", "FFFFFF", "000000", "FFFFFF"},
["{{wp|Utah Jazz}}"] = {"000000", "FFFFFF", "FFF21F", "000000"},
["{{wp|New Orleans Jazz}}"] = {"4C3262", "FFFFFF", "EFC33D", "000000"},
["{{wp|Washington Wizards}}"] = {"002B5C", "FFFFFF", "E31837", "FFFFFF"},
["{{wp|Washington Bullets}}"] = {"213582", "FFFFFF", "F02B34", "000000"},
["{{wp|Baltimore Bullets}}"] = {"112143", "FFFFFF", "E54A21", "000000"},
["{{wp|Chicago Zephyrs}}"] = {"19212F", "FFFFFF", "B78C40", "19212F"},
["{{wp|Chicago Packers}}"] = {"20327D", "FFFFFF", "DF203D", "FFFFFF"},
["{{wp|NBA}}"] = {"1D428A", "FFFFFF", "C8102E", "FFFFFF"},
["{{wp|Eastern Conference}}"] = {"1D428A", "FFFFFF", "FFFFFF", "1D428A"},
["{{wp|Western Conference}}"] = {"C8102E", "FFFFFF", "FFFFFF", "C8102E"},
["{{wp|NBA Finals}}"] = {"000000", "FFFFFF", "B59461", "000000"},
}