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
Team | 1 | 2 | 3 | 4 | Contrast | |
---|---|---|---|---|---|---|
1/2 | 4/3 | |||||
Atlanta Hawks | 5.88 | 12.15 | ||||
Baltimore Bullets | 15.88 | 5.33 | ||||
Boston Celtics | 4.84 | 7.66 | ||||
Brooklyn Nets | 21 | 21 | ||||
Buffalo Braves | 21 | 5.64 | ||||
Charlotte Bobcats | 5.64 | 6.54 | ||||
Charlotte Hornets | 5.17 | 16.14 | ||||
Charlotte Hornets (1988–2002) | 9.8 | 5.64 | ||||
Chicago Bulls | 5.55 | 21 | ||||
Chicago Packers | 11.58 | 4.76 | ||||
Chicago Zephyrs | 16.15 | 5.26 | ||||
Cincinnati Royals | 9.82 | 5.1 | ||||
Cleveland Cavaliers | 10.14 | 7.53 | ||||
Dallas Chaparrals Also known as Texas Chaparrals | 8.33 | 4.73 | ||||
Dallas Mavericks | 6.07 | 11.86 | ||||
Denver Nuggets | 15.89 | 10.01 | ||||
Detroit Pistons | 9.55 | 5.88 | ||||
Eastern Conference | 9.55 | 9.55 | ||||
Ft. Wayne Pistons | 9.47 | 6.25 | ||||
Golden State Warriors | 9.55 | 5.52 | ||||
Houston Rockets | 5.55 | 21 | ||||
Indiana Pacers | 13.53 | 7.94 | ||||
Kansas City Kings | 9.82 | 5.1 | ||||
Los Angeles Clippers | 9.55 | 5.88 | ||||
Los Angeles Lakers | 15.44 | 12.15 | ||||
Memphis Grizzlies | 4.54 | 17.21 | ||||
Miami Heat | 21 | 8.84 | ||||
Milwaukee Bucks | 10.95 | 8.46 | ||||
Milwaukee Hawks | 5.63 | 9.47 | ||||
Minneapolis Lakers | 8.1 | 12.8 | ||||
Minnesota Timberwolves | 15.82 | 6.62 | ||||
NBA | 9.55 | 5.88 | ||||
NBA Finals | 21 | 7.37 | ||||
New Jersey Americans | 4.52 | 9.47 | ||||
New Jersey Nets | 14.33 | 5.55 | ||||
New Orleans Hornets | 3.62 | 12.15 | ||||
New Orleans Jazz | 10.83 | 12.54 | ||||
New Orleans Pelicans | 15.79 | 5.74 | ||||
New York Knicks | 9.55 | 8.21 | ||||
New York Nets | 9.47 | 4.52 | ||||
Oklahoma City Thunder | 4.61 | 3.95 | ||||
Orlando Magic | 4.77 | 21 | ||||
Philadelphia 76ers | 9.55 | 5.88 | ||||
Philadelphia Warriors | 9.47 | 4.35 | ||||
Phoenix Suns | 16.14 | 6.03 | ||||
Portland Trail Blazers | 21 | 4.84 | ||||
Rochester Royals | 9.82 | 5.1 | ||||
Sacramento Kings | 21 | 9.87 | ||||
San Antonio Spurs | 21 | 13.13 | ||||
San Diego Clippers | 6.13 | 5.04 | ||||
San Diego Rockets | 7.76 | 5.05 | ||||
San Francisco Warriors | 5.56 | 12.15 | ||||
Seattle SuperSonics | 7.12 | 12.62 | ||||
St. Louis Hawks | 5.63 | 9.47 | ||||
Syracuse Nationals | 5.1 | 13.03 | ||||
Toronto Raptors | 5.55 | 21 | ||||
Tri-Cities Blackhawks | 5.63 | 9.47 | ||||
Utah Jazz | 21 | 17.97 | ||||
Vancouver Grizzlies | 7.54 | 5.86 | ||||
Washington Bullets | 11.07 | 5.1 | ||||
Washington Wizards | 14 | 4.72 | ||||
Western Conference | 5.88 | 5.88 | ||||
Free agent | X | X | 15.31 | |||
Retired | X | X | 15.31 |
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 --
["Atlanta Hawks"] = {"C8102E", "FFFFFF", "FDB927", "000000"},
["St. Louis Hawks"] = {"CF0A2C", "FFFFFF", "003DA6", "FFFFFF"},
["Milwaukee Hawks"] = {"CF0A2C", "FFFFFF", "003DA6", "FFFFFF"},
["Tri-Cities Blackhawks"] = {"CF0A2C", "FFFFFF", "003DA6", "FFFFFF"},
["Boston Celtics"] = {"008348", "FFFFFF", "BB9753", "000000"},
["Brooklyn Nets"] = {"000000", "FFFFFF", "FFFFFF", "000000"},
["New Jersey Nets"] = {"00285E", "FFFFFF", "CE1141", "FFFFFF"},
["New York Nets"] = {"003DA6", "FFFFFF", "EC0044", "FFFFFF"},
["New Jersey Americans"] = {"EC0044", "FFFFFF", "003DA6", "FFFFFF"},
["Charlotte Hornets"] = {"00788C", "FFFFFF", "1D1160", "FFFFFF"},
["Charlotte Bobcats"] = {"E75300", "000000", "3D6085", "FFFFFF"},
["Charlotte Hornets (1988–2002)"] = {"283A97", "FFFFFF", "0391AB", "000000"},
["Chicago Bulls"] = {"CE1141", "FFFFFF", "000000", "FFFFFF"},
["Cleveland Cavaliers"] = {"860038", "FFFFFF", "BC945C", "000000"},
["Dallas Mavericks"] = {"0064B1", "FFFFFF", "BBC4CA", "000000"},
["Denver Nuggets"] = {"0E2240", "FFFFFF", "FEC524", "0E2240"},
["Detroit Pistons"] = {"1D428A", "FFFFFF", "C8102E", "FFFFFF"},
["Ft. Wayne Pistons"] = {"003DA6", "FFFFFF", "C3002F", "FFFFFF"},
["Golden State Warriors"] = {"1D428A", "FFFFFF", "FDB927", "1D428A"},
["San Francisco Warriors"] = {"006BB6", "FFFFFF", "FDB927", "000000"},
["Philadelphia Warriors"] = {"003DA6", "FFFFFF", "ED174C", "FFFFFF"},
["Houston Rockets"] = {"CE1141", "FFFFFF", "000000", "FFFFFF"},
["San Diego Rockets"] = {"115E43", "FFFFFF", "FFC938", "115E43"},
["Indiana Pacers"] = {"002D62", "FFFFFF", "FDBB30", "002D62"},
["Los Angeles Clippers"] = {"1D428A", "FFFFFF", "C8102E", "FFFFFF"},
["San Diego Clippers"] = {"3E8EDE", "000000", "E24301", "000000"},
["Buffalo Braves"] = {"000000", "FFFFFF", "E75300", "000000"},
["Los Angeles Lakers"] = {"31006F", "FFFFFF", "FDB927", "000000"},
["Minneapolis Lakers"] = {"79A3DD", "000000", "F7C330", "000000"},
["Memphis Grizzlies"] = {"5D76A9", "FFFFFF", "12173F", "FFFFFF"},
["Vancouver Grizzlies"] = {"00ADA8", "000000", "BA7845", "000000"},
["Miami Heat"] = {"000000", "FFFFFF", "98002E", "FFFFFF"},
["Milwaukee Bucks"] = {"00471B", "FFFFFF", "EEE1C6", "00471B"},
["Minnesota Timberwolves"] = {"0C233F", "FFFFFF", "266092", "FFFFFF"},
["New Orleans Pelicans"] = {"0C2340", "FFFFFF", "B9975B", "0C2340"},
["New Orleans Hornets"] = {"0093B1", "FFFFFF", "FDB927", "000000"},
["New York Knicks"] = {"1D428A", "FFFFFF", "F58426", "000000"},
["Oklahoma City Thunder"] = {"007AC1", "FFFFFF", "EF3B24", "FFFFFF"},
["Seattle SuperSonics"] = {"006633", "FFFFFF", "FFBE00", "000000"},
["Orlando Magic"] = {"0077C0", "FFFFFF", "000000", "FFFFFF"},
["Philadelphia 76ers"] = {"1D428A", "FFFFFF", "C8102E", "FFFFFF"},
["Syracuse Nationals"] = {"DD0031", "FFFFFF", "002E6D", "FFFFFF"},
["Phoenix Suns"] = {"1D1160", "FFFFFF", "E56020", "000000"},
["Portland Trail Blazers"] = {"000000", "FFFFFF", "E03A3E", "000000"},
["Sacramento Kings"] = {"000000", "FFFFFF", "5A2D81", "FFFFFF"},
["Kansas City Kings"] = {"1E3D92", "FFFFFF", "CE3320", "FFFFFF"},
["Cincinnati Royals"] = {"1E3D92", "FFFFFF", "CE3320", "FFFFFF"},
["Rochester Royals"] = {"1E3D92", "FFFFFF", "CE3320", "FFFFFF"},
["San Antonio Spurs"] = {"000000", "FFFFFF", "C4CED4", "000000"},
["Dallas Chaparrals"] = {"1149A5", "FFFFFF", "EF052A", "000000"},
["Texas Chaparrals"] = "Dallas Chaparrals",
["Toronto Raptors"] = {"CE1141", "FFFFFF", "000000", "FFFFFF"},
["Utah Jazz"] = {"000000", "FFFFFF", "FFF21F", "000000"},
["New Orleans Jazz"] = {"4C3262", "FFFFFF", "EFC33D", "000000"},
["Washington Wizards"] = {"002B5C", "FFFFFF", "E31837", "FFFFFF"},
["Washington Bullets"] = {"213582", "FFFFFF", "F02B34", "000000"},
["Baltimore Bullets"] = {"112143", "FFFFFF", "E54A21", "000000"},
["Chicago Zephyrs"] = {"19212F", "FFFFFF", "B78C40", "19212F"},
["Chicago Packers"] = {"20327D", "FFFFFF", "DF203D", "FFFFFF"},
["NBA"] = {"1D428A", "FFFFFF", "C8102E", "FFFFFF"},
["Eastern Conference"] = {"1D428A", "FFFFFF", "FFFFFF", "1D428A"},
["Western Conference"] = {"C8102E", "FFFFFF", "FFFFFF", "C8102E"},
["NBA Finals"] = {"000000", "FFFFFF", "B59461", "000000"},
}