Modul:College color
Videz
This module is used by
- {{CollegePrimaryHex}}, {{CollegePrimaryStyle}}, {{CollegePrimaryColorLink}},
- {{CollegeSecondaryHex}}, {{CollegeSecondaryStyle}}, {{CollegeSecondaryColorLink}},
- {{NCAA color}}, {{NCAA color cell}}, {{NCAA secondary color cell}}
- {{Infobox baseball biography/style}}
- {{Infobox basketball biography/style}}
- {{CBB roster/Header}}
Usage
[uredi kodo]{{#invoke:College color|color}}in the NCAA color template{{#invoke:College color|color1}}in the primary color template{{#invoke:College color|color32}}in the secondary color template{{#invoke:College color|style1}}in the primary style template{{#invoke:College color|style2}}in the secondary style template{{#invoke:College color|header1}}in the primary header style of an infobox{{#invoke:College color|header2}}in the secondary header style of an infobox{{#invoke:College color|stripe1}}in the primary header style of an infobox{{#invoke:College color|check}}to check to see if a team has defined colors
Updating team colors
[uredi kodo]See Module:college color/data.
Test table
[uredi kodo]| Team | 1 | 2 | 3 | Contrast | ||||
|---|---|---|---|---|---|---|---|---|
| 1/2 | 2/3 | 3/1 | 1/w | 1/b | ||||
| Abilene Christian Wildcats | 7.38 | 1.5 | 4.93 | 7.38 | 2.84 | |||
| Air Force Falcons | 9.85 | 2.26 | 4.36 | 9.85 | 2.13 | |||
| Akron Zips | 14.33 | 1.97 | 7.26 | 14.33 | 1.47 | |||
| Alabama A&M Bulldogs aka Alabama A&M Lady Bulldogs | X | 8.61 | 8.61 | 2.44 | ||||
| Alabama Crimson Tide | X | 8.92 | 8.92 | 2.35 | ||||
| Alabama State Hornets | 21 | 1.4 | 14.97 | 21 | 1 | |||
| Alabama–Huntsville Chargers aka UAH Chargers | X | 7.28 | 7.28 | 2.89 | ||||
| Alaska Anchorage Seawolves | 9.64 | 1.74 | 5.54 | 9.64 | 2.18 | |||
| Alaska Nanooks aka Alaska-Fairbanks Nanooks | 6.58 | 1.41 | 4.66 | 6.58 | 3.19 | |||
| Albany Great Danes | 12.28 | 1.56 | 7.86 | 12.28 | 1.71 | |||
| Alberta Golden Bears | 11.53 | 1.15 | 10.02 | 11.53 | 1.82 | |||
| Alcorn State Braves aka Alcorn State Lady Braves | X | 9.42 | 9.42 | 2.23 | ||||
| American International Yellow Jackets aka AIC Yellow Jackets | 21 | 1.62 | 12.98 | 21 | 1 | |||
| Angelo State Rams | 7.61 | 1.67 | 4.56 | 7.61 | 2.76 | |||
| Appalachian State Mountaineers | 15.91 | 1.51 | 10.52 | 15.91 | 1.32 | |||
| Arizona State Sun Devils | 9.3 | 1.59 | 5.86 | 9.3 | 2.26 | |||
| Arizona Wildcats | 5.81 | 12.61 | 2.17 | 5.81 | 3.62 | |||
| Arkansas Razorbacks | X | 7.74 | 7.74 | 2.71 | ||||
| Arkansas State Red Wolves | 5.76 | 21 | 3.65 | 5.76 | 3.65 | |||
| Arkansas-Pine Bluff Golden Lions | 21 | 1.4 | 14.97 | 21 | 1 | |||
| Army Black Knights | 21 | 2.03 | 10.33 | 21 | 1 | |||
| Auburn Tigers | 15.4 | 3.9 | 3.95 | 15.4 | 1.36 | |||
| Austin Peay Governors aka Austin Peay Lady Govs aka Austin Peay State Governors aka Austin Peay State Lady Govs | X | 5.84 | 5.84 | 3.59 | ||||
| BYU–Hawaii Seasiders | 8.92 | 1.51 | 5.9 | 8.92 | 2.35 | |||
| Baker Wildcats | X | 5.11 | 2.65 | 7.93 | ||||
| Ball State Cardinals | X | 5.84 | 5.84 | 3.59 | ||||
| Baylor Bears | 14.65 | 1.53 | 9.6 | 14.65 | 1.43 | |||
| Belmont Bruins | 10.28 | 5.63 | 1.83 | 10.28 | 2.04 | |||
| Bemidji State Beavers | X | 12.51 | 12.51 | 1.68 | ||||
| Bentley Falcons | X | 21 | 21 | 1 | ||||
| Bethune-Cookman Wildcats | 10 | 1.97 | 5.06 | 10 | 2.1 | |||
| Binghamton Bearcats | X | 6.5 | 6.5 | 3.23 | ||||
| Birmingham-Southern Panthers | 21 | 1.31 | 16.02 | 21 | 1 | |||
| Bishop's Gaiters aka Bishops Gaiters | 12.22 | 2.35 | 5.2 | 12.22 | 1.72 | |||
| Boise State Broncos | 11.77 | 3.2 | 3.68 | 11.77 | 1.78 | |||
| Boston College Eagles | 8.61 | 2.24 | 3.84 | 8.61 | 2.44 | |||
| Boston University Terriers | X | 5.89 | 5.89 | 3.57 | ||||
| Bowling Green Falcons | 2.73 | 12.28 | 4.5 | 2.73 | 7.7 | |||
| Bradley Braves | X | 8.08 | 8.08 | 2.6 | ||||
| Brigham Young University Cougars aka BYU Cougars aka Brigham Young Cougars | X | 14.94 | 14.94 | 1.41 | ||||
| Brown Bears | 16.86 | 5.84 | 2.88 | 16.86 | 1.25 | |||
| Bucknell Bison | 3.39 | 11.83 | 3.49 | 3.39 | 6.2 | |||
| Buffalo Bulls | X | 12.91 | 12.91 | 1.63 | ||||
| Butler Bulldogs | X | 9.05 | 9.05 | 2.32 | ||||
| CCNY Beavers | 3.01 | 21 | 6.98 | 3.01 | 6.98 | |||
| Cal Poly Mustangs | 10.88 | 1.29 | 8.44 | 10.88 | 1.93 | |||
| Cal State Bakersfield Roadrunners | 6.58 | 1.52 | 4.33 | 6.58 | 3.19 | |||
| Cal State Fullerton Titans | 9.17 | 2.53 | 3.62 | 9.17 | 2.29 | |||
| Cal State Northridge Matadors | X | 5.14 | 5.14 | 4.09 | ||||
| Calgary Dinos | 5.89 | 1.51 | 3.89 | 5.89 | 3.57 | |||
| California Golden Bears | 16.54 | 1.56 | 10.6 | 16.54 | 1.27 | |||
| California Vulcans | 8.92 | 21 | 2.35 | 8.92 | 2.35 | |||
| Canisius Golden Griffins | 15.3 | 2.03 | 7.54 | 15.3 | 1.37 | |||
| Carlisle Indians | 7.31 | 2.03 | 3.59 | 7.31 | 2.87 | |||
| Catawba Indians | X | 16.01 | 16.01 | 1.31 | ||||
| Central Arkansas Bears aka Central Arkansas Sugar Bears | 10.84 | 2.79 | 3.88 | 10.84 | 1.94 | |||
| Central Connecticut Blue Devils | X | 7.75 | 7.75 | 2.71 | ||||
| Central Michigan Chippewas | 12.66 | 1.55 | 8.17 | 12.66 | 1.66 | |||
| Central Missouri Mules aka Central Missouri Jennies | 5.39 | 21 | 3.9 | 5.39 | 3.9 | |||
| Central Oklahoma Bronchos | 12.61 | 1.51 | 8.34 | 12.61 | 1.67 | |||
| Central State Marauders | 10.14 | 1.45 | 6.99 | 10.14 | 2.07 | |||
| Central Washington Wildcats | X | 5.81 | 5.81 | 3.62 | ||||
| Centre Colonels aka Centre Praying Colonels | X | 2.03 | 2.03 | 10.33 | ||||
| Charlotte 49ers | X | 6.21 | 6.21 | 3.38 | ||||
| Chattanooga Mocs aka Chattanooga Lady Mocs | 11.81 | 2.12 | 5.58 | 11.81 | 1.78 | |||
| Chicago Maroons | X | 13.42 | 13.42 | 1.56 | ||||
| Cincinnati Bearcats | 21 | 5 | 4.2 | 21 | 1 | |||
| Citadel Bulldogs aka The Citadel Bulldogs | 3.59 | 15.62 | 4.35 | 3.59 | 5.85 | |||
| Clarkson Golden Knights | 9.56 | 1.47 | 6.5 | 9.56 | 2.2 | |||
| Clemson Tigers aka Clemson Lady Tigers | 3.04 | 10.26 | 3.38 | 3.04 | 6.91 | |||
| Cleveland State Vikings | X | 6.63 | 6.63 | 3.17 | ||||
| Coastal Carolina Chanticleers | 4.77 | 3.74 | 1.28 | 4.77 | 4.4 | |||
| Colgate Raiders | X | 10.95 | 10.95 | 1.92 | ||||
| College of Charleston Cougars | X | 10.95 | 10.95 | 1.92 | ||||
| Colorado Buffaloes | 21 | 1.94 | 10.8 | 21 | 1 | |||
| Colorado College Tigers | X | 11.13 | 21 | 1 | ||||
| Colorado State Rams | 6.5 | 1.51 | 4.31 | 6.5 | 3.23 | |||
| Columbia Lions | X | 2.29 | 2.29 | 9.17 | ||||
| Connecticut Huskies | X | 19.02 | 19.02 | 1.1 | ||||
| Cornell Big Red | X | 6.8 | 6.8 | 3.09 | ||||
| Creighton Bluejays | X | 17.62 | 17.62 | 1.19 | ||||
| Cumberland Bulldogs | 9.05 | 21 | 2.32 | 9.05 | 2.32 | |||
| Dartmouth Big Green | X | 6.67 | 6.67 | 3.15 | ||||
| Davidson Wildcats | 9 | 21 | 2.33 | 9 | 2.33 | |||
| Dayton Flyers | 5.55 | 8.78 | 1.58 | 5.55 | 3.78 | |||
| DePaul Blue Demons | 9.63 | 4.36 | 2.21 | 9.63 | 2.18 | |||
| Delaware Fightin' Blue Hens | 7.67 | 1.45 | 5.29 | 7.67 | 2.74 | |||
| Delaware State Hornets | X | 3.08 | 4.57 | 4.6 | ||||
| Denver Pioneers | 8.81 | 4.69 | 1.88 | 8.81 | 2.38 | |||
| Detroit Titans | 4.27 | 6.99 | 1.64 | 4.27 | 4.92 | |||
| Drake Bulldogs | 10.03 | 3.01 | 3.34 | 10.03 | 2.09 | |||
| Drexel Dragons | X | 9.3 | 14.65 | 1.43 | ||||
| Duke Blue Devils | X | 10.13 | 10.13 | 2.07 | ||||
| Duquesne Dukes | 15.85 | 5.89 | 2.69 | 15.85 | 1.32 | |||
| East Carolina Pirates | 9.89 | 1.56 | 6.35 | 9.89 | 2.12 | |||
| East Central Tigers | 3.25 | 21 | 6.46 | 3.25 | 6.46 | |||
| Eastern Arizona Gila Monsters | X | 15.64 | 15.64 | 1.34 | ||||
| Eastern Illinois Panthers | 3.84 | 21 | 5.47 | 3.84 | 5.47 | |||
| Eastern Kentucky Colonels | X | 10.95 | 10.95 | 1.92 | ||||
| Eastern Michigan Eagles | X | 7.44 | 7.44 | 2.82 | ||||
| Eastern Washington Eagles | 8.27 | 21 | 2.54 | 8.27 | 2.54 | |||
| Elon Phoenix | X | 5.38 | 10.95 | 1.92 | ||||
| Emporia State Hornets aka Emporia State Lady Hornets | 16.3 | 3.03 | 5.38 | 16.3 | 1.29 | |||
| Evansville Purple Aces | X | 9.59 | 9.59 | 2.19 | ||||
| Ferris State Bulldogs | 5.81 | 1.57 | 3.69 | 5.81 | 3.62 | |||
| Florida A&M Rattlers | 9.05 | 2.74 | 3.3 | 9.05 | 2.32 | |||
| Florida Atlantic Owls aka FAU Owls | 12.61 | 5.89 | 2.14 | 12.61 | 1.67 | |||
| Florida Gators | 11.93 | 3.37 | 3.54 | 11.93 | 1.76 | |||
| Florida Gulf Coast Eagles | 13.25 | 4.5 | 2.95 | 13.25 | 1.58 | |||
| Florida International Golden Panthers aka FIU Golden Panthers aka FIU Panthers aka Florida International Panthers | 13.53 | 2.71 | 4.99 | 13.53 | 1.55 | |||
| Florida State Seminoles | 9.21 | 1.94 | 4.75 | 9.21 | 2.28 | |||
| Fordham Rams | X | 9.98 | 9.98 | 2.1 | ||||
| Fort Hays State Tigers | 21 | 1.69 | 12.43 | 21 | 1 | |||
| Fort Valley State Wildcats | X | 8 | 8.59 | 2.44 | ||||
| Fresno State Bulldogs | 6.82 | 13.25 | 1.94 | 6.82 | 3.08 | |||
| Furman Paladins aka Furman Purple Hurricane | 9.99 | 2.38 | 4.2 | 9.99 | 2.1 | |||
| Gallaudet Bison | 9.8 | 1.46 | 6.71 | 9.8 | 2.14 | |||
| Gardner–Webb Runnin' Bulldogs | 5.44 | 21 | 3.86 | 5.44 | 3.86 | |||
| George Mason Patriots | 7.12 | 1.51 | 4.73 | 7.12 | 2.95 | |||
| George Washington Colonials | X | 9.21 | 14.94 | 1.41 | ||||
| Georgetown Hoyas | 16.62 | 4.24 | 3.92 | 16.62 | 1.26 | |||
| Georgia Bulldogs | 4.87 | 14.28 | 2.93 | 4.87 | 4.32 | |||
| Georgia Southern Eagles | 17.62 | 2.96 | 5.96 | 17.62 | 1.19 | |||
| Georgia State Panthers | X | 9.83 | 9.83 | 2.14 | ||||
| Georgia Tech Yellow Jackets aka Georgia Tech Golden Tornado | 2.74 | 15.34 | 5.6 | 2.74 | 7.67 | |||
| Gonzaga Bulldogs | X | 14.42 | 14.42 | 1.46 | ||||
| Grand Canyon Antelopes | X | 10.26 | 10.26 | 2.05 | ||||
| Grantham Talons | X | 8.76 | 12.61 | 1.67 | ||||
| Green Bay Phoenix | X | 7.12 | 7.12 | 2.95 | ||||
| Grinnell Pioneers | X | 5.5 | 21 | 1 | ||||
| Hampton Pirates | 7.74 | 2.61 | 2.97 | 7.74 | 2.71 | |||
| Hartford Hawks | X | 3.82 | 3.82 | 5.5 | ||||
| Hartwick Hawks | X | 7.43 | 7.43 | 2.83 | ||||
| Harvard Crimson | 7.77 | 21 | 2.7 | 7.77 | 2.7 | |||
| Hawaii Warriors aka Hawaii Rainbow Wahine aka Hawaii Rainbows aka Hawaii Rainbow Warriors | X | 10.78 | 10.78 | 1.95 | ||||
| High Point Panthers | X | 12.89 | 12.89 | 1.63 | ||||
| Hobart Statesmen | 2.53 | 9.42 | 3.72 | 2.53 | 8.29 | |||
| Holy Cross Crusaders | X | 4.55 | 4.55 | 4.61 | ||||
| Houston Baptist Huskies | X | 5.79 | 14.66 | 1.43 | ||||
| Houston Cougars | X | 5.89 | 5.89 | 3.57 | ||||
| Idaho State Bengals | 21 | 2.76 | 7.6 | 21 | 1 | |||
| Idaho Vandals | X | 6.9 | 3.04 | 6.9 | ||||
| Illinois Fighting Illini | 3.95 | 14.52 | 3.68 | 3.95 | 5.32 | |||
| Illinois State Redbirds | X | 5.63 | 5.63 | 3.73 | ||||
| Incarnate Word Cardinals | X | 5.25 | 4 | 5.25 | ||||
| Indiana Hoosiers | X | 7.51 | 10.73 | 1.96 | ||||
| Indiana State Sycamores | X | 8.15 | 8.15 | 2.58 | ||||
| Iona Gaels | 8.74 | 1.51 | 5.78 | 8.74 | 2.4 | |||
| Iowa Hawkeyes | 21 | 1.31 | 16.02 | 21 | 1 | |||
| Iowa State Cyclones | 7.43 | 1.55 | 4.78 | 7.43 | 2.82 | |||
| Jackson State Tigers | X | 16.05 | 16.05 | 1.31 | ||||
| Jacksonville Dolphins | 7.81 | 2.11 | 3.71 | 7.81 | 2.69 | |||
| Jacksonville State Gamecocks | X | 4.53 | 4.53 | 4.64 | ||||
| James Madison Dukes | 13.24 | 2.47 | 5.36 | 13.24 | 1.59 | |||
| Johns Hopkins Blue Jays | 3.49 | 21 | 6.02 | 3.49 | 6.02 | |||
| Johnson C. Smith Golden Bulls | 13.91 | 1.48 | 9.39 | 13.91 | 1.51 | |||
| Kansas Jayhawks | 11.12 | 4.73 | 2.35 | 11.12 | 1.89 | |||
| Kansas State Wildcats | X | 10.45 | 10.45 | 2.01 | ||||
| Kennesaw State Owls | 21 | 1.92 | 10.93 | 21 | 1 | |||
| Kent State Golden Flashes | 15.47 | 2.05 | 7.55 | 15.47 | 1.36 | |||
| Kentucky Wildcats | X | 6.67 | 6.67 | 3.15 | ||||
| La Salle Explorers | 11.81 | 1.56 | 7.55 | 11.81 | 1.78 | |||
| Lafayette Leopards | X | 10.95 | 10.95 | 1.92 | ||||
| Lake Superior State Lakers | 7.66 | 1.59 | 4.81 | 7.66 | 2.74 | |||
| Lamar Cardinals aka Lamar Lady Cardinals | X | 4.71 | 4.71 | 4.46 | ||||
| Lehigh Mountain Hawks | X | 12.3 | 12.3 | 1.71 | ||||
| Liberty Flames aka Liberty Lady Flames | 15.13 | 7.44 | 2.03 | 15.13 | 1.39 | |||
| Lincoln Blue Tigers | 15.31 | 3.32 | 4.61 | 15.31 | 1.37 | |||
| Lindenwood Lions aka Lindenwood Lady Lions | 21 | 1.57 | 13.42 | 21 | 1 | |||
| Lipscomb Bisons aka Lipscomb Lady Bisons | 14.44 | 1.98 | 7.29 | 14.44 | 1.45 | |||
| Long Beach State 49ers | 21 | 1.33 | 15.81 | 21 | 1 | |||
| Long Island Blackbirds | X | 21 | 21 | 1 | ||||
| Louisiana State Tigers aka LSU Tigers | 12.16 | 1.48 | 8.23 | 12.16 | 1.73 | |||
| Louisiana Tech Bulldogs aka Louisiana Tech Lady Techsters | 11.8 | 4.76 | 2.48 | 11.8 | 1.78 | |||
| Louisiana–Lafayette Ragin' Cajuns aka Louisiana Ragin' Cajuns aka Louisiana-Lafayette Ragin' Cajuns | 8.24 | 21 | 2.55 | 8.24 | 2.55 | |||
| Louisiana–Monroe Warhawks aka Louisiana-Monroe Warhawks aka ULM Warhawks | 13.42 | 3.14 | 4.27 | 13.42 | 1.56 | |||
| Louisville Cardinals | 7.56 | 21 | 2.78 | 7.56 | 2.78 | |||
| Lourdes Gray Wolves | 3.09 | 21 | 6.79 | 3.09 | 6.79 | |||
| Loyola Marymount Lions | 9.63 | 12.79 | 1.33 | 9.63 | 2.18 | |||
| Loyola Ramblers | 10.95 | 1.51 | 7.24 | 10.95 | 1.92 | |||
| Maine Black Bears | 12.83 | 3.18 | 4.03 | 12.83 | 1.64 | |||
| Manitoba Bisons | 6.36 | 1.4 | 4.53 | 6.36 | 3.3 | |||
| Marquette Warriors aka Marquette Golden Eagles | 11.75 | 1.7 | 6.9 | 11.75 | 1.79 | |||
| Marshall Thundering Herd | X | 3.63 | 3.63 | 5.78 | ||||
| Maryland Terrapins | 5.88 | 1.47 | 4 | 5.88 | 3.57 | |||
| Massachusetts Minutemen | X | 10.95 | 10.95 | 1.92 | ||||
| McGill Redmen | X | 4 | 4 | 5.25 | ||||
| McNeese State Cowboys aka McNeese State Cowgirls | 10.5 | 1.49 | 7.04 | 10.5 | 2 | |||
| Memphis Tigers | 13.67 | 1.62 | 8.42 | 13.67 | 1.54 | |||
| Mercer Bears | 3.01 | 21 | 6.98 | 3.01 | 6.98 | |||
| Mercyhurst Lakers | X | 7.12 | 7.12 | 2.95 | ||||
| Merrimack Warriors | 18.68 | 1.42 | 13.15 | 18.68 | 1.12 | |||
| Miami Hurricanes | 9.59 | 2.87 | 3.34 | 9.59 | 2.19 | |||
| Miami RedHawks | X | 5.63 | 5.63 | 3.73 | ||||
| Michigan State Spartans | X | 10.75 | 10.75 | 1.95 | ||||
| Michigan Tech Huskies | 21 | 1.49 | 14.08 | 21 | 1 | |||
| Michigan Wolverines | 15.06 | 1.52 | 9.89 | 15.06 | 1.39 | |||
| Middle Tennessee State Blue Raiders aka Middle Tennessee Blue Raiders | X | 5.57 | 5.57 | 3.77 | ||||
| Midwestern State Mustangs | 10.84 | 1.95 | 5.57 | 10.84 | 1.94 | |||
| Milwaukee Panthers | 21 | 1.7 | 12.33 | 21 | 1 | |||
| Minnesota Golden Gophers | 11.4 | 1.51 | 7.57 | 11.4 | 1.84 | |||
| Minnesota State Mavericks aka MSU-Mankato Mavericks aka Mankato State Mavericks aka Minnesota State–Mankato Mavericks | 10.26 | 1.33 | 7.73 | 10.26 | 2.05 | |||
| Minnesota–Duluth Bulldogs | 10.95 | 1.4 | 7.81 | 10.95 | 1.92 | |||
| Mississippi Rebels aka Ole Miss Rebels | 8.41 | 4.99 | 1.69 | 8.41 | 2.5 | |||
| Mississippi State Bulldogs | X | 13.42 | 13.42 | 1.56 | ||||
| Mississippi Valley State Delta Devils | X | 4.39 | 4.39 | 4.78 | ||||
| Missouri S&T Miners | 8.84 | 1.72 | 5.14 | 8.84 | 2.38 | |||
| Missouri Southern Lions | 12.12 | 1.58 | 7.69 | 12.12 | 1.73 | |||
| Missouri State Bears | X | 14.19 | 14.19 | 1.48 | ||||
| Missouri Tigers | 21 | 1.81 | 11.63 | 21 | 1 | |||
| Missouri Western Griffons | 21 | 1.6 | 13.14 | 21 | 1 | |||
| Monmouth Hawks | X | 16.09 | 17.28 | 1.22 | ||||
| Montana Grizzlies aka Montana Lady Griz | 14.06 | 3.29 | 4.28 | 14.06 | 1.49 | |||
| Montana State Bobcats | 15.16 | 2.1 | 7.21 | 15.16 | 1.39 | |||
| Morehead State Eagles | 14.38 | 1.42 | 10.13 | 14.38 | 1.46 | |||
| Mount Union Purple Raiders | X | 11.99 | 11.99 | 1.75 | ||||
| Mountain West Conference | X | 4.73 | 10.43 | 2.01 | ||||
| Murray State Racers | 17.28 | 1.4 | 12.32 | 17.28 | 1.22 | |||
| NJIT Highlanders | X | 4 | 4 | 5.25 | ||||
| Navy Midshipmen | 16.01 | 2.1 | 7.61 | 16.01 | 1.31 | |||
| Nebraska Cornhuskers | X | 4.57 | 5.15 | 4.07 | ||||
| Nebraska–Kearney Lopers | 11.92 | 2.8 | 4.25 | 11.92 | 1.76 | |||
| Nevada Wolf Pack | 12.61 | 2.85 | 4.43 | 12.61 | 1.67 | |||
| New Hampshire Wildcats | X | 11.8 | 11.8 | 1.78 | ||||
| New Mexico Lobos | 6.32 | 6.54 | 1.03 | 6.32 | 3.32 | |||
| New Mexico State Aggies | X | 13.42 | 13.42 | 1.56 | ||||
| New Orleans Privateers aka UNO Privateers | 7.82 | 2.36 | 3.32 | 7.82 | 2.69 | |||
| Niagara Purple Eagles | X | 12.16 | 12.16 | 1.73 | ||||
| Nicholls State Colonels | 6.04 | 2.04 | 2.96 | 6.04 | 3.48 | |||
| Norfolk State Spartans | 10.5 | 1.67 | 6.27 | 10.5 | 2 | |||
| North Alabama Lions | 13.74 | 1.51 | 9.09 | 13.74 | 1.53 | |||
| North Carolina Central Eagles | X | 8.54 | 8.54 | 2.46 | ||||
| North Carolina State Wolfpack aka NC State Wolfpack | 5.89 | 21 | 3.57 | 5.89 | 3.57 | |||
| North Carolina Tar Heels | X | 2.35 | 2.35 | 8.92 | ||||
| North Dakota aka North Dakota Fighting Sioux | X | 3.68 | 3.68 | 5.71 | ||||
| North Dakota State Bison | 8.68 | 1.56 | 5.56 | 8.68 | 2.42 | |||
| North Florida Ospreys | 16.71 | 1.9 | 8.79 | 16.71 | 1.26 | |||
| North Texas Mean Green | X | 4.75 | 4.75 | 4.42 | ||||
| Northeastern Huskies | 5.89 | 21 | 3.57 | 5.89 | 3.57 | |||
| Northeastern State RiverHawks | 4.79 | 2.58 | 1.86 | 4.79 | 4.38 | |||
| Northern Arizona Lumberjacks | 12.61 | 1.51 | 8.34 | 12.61 | 1.67 | |||
| Northern Illinois Huskies | 5.84 | 21 | 3.59 | 5.84 | 3.59 | |||
| Northern Iowa Panthers | X | 7.39 | 10.37 | 2.02 | ||||
| Northern Kentucky Norse | 21 | 1.4 | 14.97 | 21 | 1 | |||
| Northern Michigan Wildcats | 13.2 | 1.74 | 7.58 | 13.2 | 1.59 | |||
| Northwest Missouri State Bearcats | X | 6.93 | 6.93 | 3.03 | ||||
| Northwestern State Demons aka Northwestern State Lady Demons | 8.41 | 2.94 | 2.86 | 8.41 | 2.5 | |||
| Northwestern Wildcats | X | 14.16 | 14.16 | 1.48 | ||||
| Notre Dame Fighting Irish | X | 7.1 | 14.03 | 1.5 | ||||
| Oakland Golden Grizzlies | 21 | 3.8 | 5.53 | 21 | 1 | |||
| Oglethorpe Stormy Petrels | 21 | 1.16 | 18.08 | 21 | 1 | |||
| Ohio Bobcats | X | 6.63 | 6.63 | 3.17 | ||||
| Ohio State Buckeyes | 6.75 | 5.74 | 1.17 | 6.75 | 3.11 | |||
| Oklahoma Baptist Bison | 7.64 | 1.86 | 4.1 | 7.64 | 2.75 | |||
| Oklahoma Christian Eagles | 13.42 | 1.61 | 8.36 | 13.42 | 1.56 | |||
| Oklahoma City Stars | 8.91 | 21 | 2.36 | 8.91 | 2.36 | |||
| Oklahoma Sooners | X | 9.35 | 9.96 | 2.11 | ||||
| Oklahoma State Cowboys aka Oklahoma State Cowgirls aka Oklahoma A&M Aggies | 2.73 | 21 | 7.7 | 2.73 | 7.7 | |||
| Old Dominion Monarchs | 13.9 | 2.23 | 6.23 | 13.9 | 1.51 | |||
| Omaha Mavericks aka UNO Mavericks aka Nebraska–Omaha Mavericks | 6.08 | 21 | 3.46 | 6.08 | 3.46 | |||
| Oral Roberts Golden Eagles | 13.33 | 2.93 | 4.54 | 13.33 | 1.58 | |||
| Oregon Ducks aka Oregon Webfoots | 10.6 | 1.31 | 8.08 | 10.6 | 1.98 | |||
| Oregon State Beavers | 5.03 | 21 | 4.17 | 5.03 | 4.17 | |||
| Ouachita Baptist Tigers | 12.11 | 1.35 | 8.95 | 12.11 | 1.73 | |||
| Pacific Tigers | 2.53 | 21 | 8.29 | 2.53 | 8.29 | |||
| Penn Quakers aka Pennsylvania Quakers | 14.08 | 9.16 | 1.54 | 14.08 | 1.49 | |||
| Penn State Nittany Lions | X | 14.39 | 14.39 | 1.46 | ||||
| Pepperdine Waves | 11.93 | 4.1 | 2.91 | 11.93 | 1.76 | |||
| Pittsburg State Gorillas | 5.49 | 1.47 | 3.73 | 5.49 | 3.83 | |||
| Pittsburgh Panthers aka Pitt Panthers | 15.29 | 1.95 | 7.83 | 15.29 | 1.37 | |||
| Portland Pilots | X | 12.16 | 12.16 | 1.73 | ||||
| Portland State Vikings | X | 11.07 | 11.07 | 1.9 | ||||
| Prairie View Panthers | 15.76 | 1.51 | 10.46 | 15.76 | 1.33 | |||
| Princeton Tigers | 3.01 | 21 | 6.98 | 3.01 | 6.98 | |||
| Providence Friars | 21 | 1.82 | 11.54 | 21 | 1 | |||
| Purdue Boilermakers | X | 7.32 | 21 | 1 | ||||
| Quinnipiac Bobcats | 14.6 | 1.6 | 9.11 | 14.6 | 1.44 | |||
| RIT Tigers | 7.06 | 1.82 | 3.88 | 2.97 | 7.06 | |||
| RPI Engineers aka Rensselaer Engineers | X | 5.84 | 5.84 | 3.6 | ||||
| Regina Rams | 9.6 | 1.48 | 6.49 | 9.6 | 2.19 | |||
| Rhode Island Rams | 2.29 | 12.71 | 5.55 | 2.29 | 9.17 | |||
| Rice Owls | 14.42 | 6.31 | 2.28 | 14.42 | 1.46 | |||
| Richmond Spiders | 17.62 | 8.92 | 1.98 | 17.62 | 1.19 | |||
| Rider Broncs | X | 13.11 | 13.11 | 1.6 | ||||
| Robert Morris Colonials aka RMU Colonials | X | 15.31 | 15.31 | 1.37 | ||||
| Rockhurst Hawks | X | 7.2 | 7.2 | 2.92 | ||||
| Rutgers Scarlet Knights | X | 5.43 | 5.43 | 3.86 | ||||
| Sacramento State Hornets | 8.64 | 2.09 | 4.13 | 8.64 | 2.43 | |||
| Sacred Heart Pioneers | 8.92 | 2.55 | 3.5 | 8.92 | 2.35 | |||
| Saint Joseph's Hawks | X | 8.92 | 8.92 | 2.35 | ||||
| Saint Louis Billikens | X | 11.22 | 11.22 | 1.87 | ||||
| Saint Mary's Gaels | 18.82 | 5.89 | 3.2 | 18.82 | 1.12 | |||
| Sam Houston State Bearkats | 2.94 | 8.59 | 2.93 | 2.94 | 7.15 | |||
| Samford Bulldogs | 5.85 | 13.92 | 2.38 | 5.85 | 3.59 | |||
| San Diego State Aztecs | 5.56 | 21 | 3.77 | 5.56 | 3.77 | |||
| San Diego Toreros | 14.94 | 1.72 | 8.69 | 14.94 | 1.41 | |||
| San Francisco Dons | 7.12 | 1.51 | 4.73 | 7.12 | 2.95 | |||
| San Francisco State Gators | X | 6.72 | 9.42 | 2.23 | ||||
| San Jose State Spartans aka San José State Spartans | 7.44 | 2.11 | 3.53 | 7.44 | 2.82 | |||
| Santa Clara Broncos | 7.56 | 1.23 | 6.14 | 7.56 | 2.78 | |||
| Saskatchewan Huskies | X | 9.6 | 9.6 | 2.19 | ||||
| Savannah State Lady Tigers aka Savannah State Tigers | 4.31 | 12.54 | 2.91 | 4.31 | 4.87 | |||
| Seton Hall Pirates | 8.59 | 1.5 | 5.74 | 8.59 | 2.44 | |||
| Sewanee Tigers | 9.99 | 1.73 | 5.77 | 9.99 | 2.1 | |||
| Simon Fraser Clan | 13.75 | 6.04 | 2.28 | 13.75 | 1.53 | |||
| South Alabama Jaguars | 17.62 | 4 | 4.41 | 17.62 | 1.19 | |||
| South Carolina Gamecocks | 12.12 | 21 | 1.73 | 12.12 | 1.73 | |||
| South Carolina State Bulldogs | X | 9.09 | 9.09 | 2.31 | ||||
| South Dakota Coyotes | 7.56 | 21 | 2.78 | 7.56 | 2.78 | |||
| South Dakota State Jackrabbits | 10.47 | 1.46 | 7.17 | 10.47 | 2.01 | |||
| South Florida Bulls | 6.93 | 1.75 | 3.95 | 6.93 | 3.03 | |||
| Southeast Missouri State Redhawks | 5.88 | 21 | 3.57 | 5.88 | 3.57 | |||
| Southeastern Louisiana Lions aka Southeastern Louisiana Lady Lions | 6.84 | 2.12 | 3.23 | 6.84 | 3.07 | |||
| Southern Connecticut State Owls | X | 14.22 | 14.22 | 1.48 | ||||
| Southern Illinois Salukis | 13.42 | 21 | 1.56 | 13.42 | 1.56 | |||
| Southern Methodist University Mustangs aka SMU Mustangs | 5.63 | 9.85 | 1.75 | 5.63 | 3.73 | |||
| Southern Miss Golden Eagles | X | 14.36 | 21 | 1 | ||||
| Southern Utah Thunderbirds | 5.58 | 21 | 3.77 | 5.58 | 3.77 | |||
| Southwest Baptist Bearcats | X | 9.99 | 9.99 | 2.1 | ||||
| Southwestern Oklahoma State Bullogs | 12.12 | 3.43 | 3.54 | 12.12 | 1.73 | |||
| St. Bonaventure Bonnies | X | 8.22 | 8.22 | 2.55 | ||||
| St. Cloud State Huskies | 5.84 | 21 | 3.59 | 5.84 | 3.59 | |||
| St. Francis Brooklyn Terriers | 11.31 | 4.66 | 2.43 | 11.31 | 1.86 | |||
| St. John's Red Storm | X | 4 | 4 | 5.25 | ||||
| St. Lawrence Saints | X | 6.89 | 6.89 | 3.05 | ||||
| Stanford Cardinal aka Stanford Indians aka Stanford | X | 9.4 | 9.4 | 2.23 | ||||
| Stephen F. Austin Lumberjacks aka Stephen F. Austin Ladyjacks | X | 15.76 | 15.76 | 1.33 | ||||
| Stetson Hatters | X | 4.11 | 4.11 | 5.12 | ||||
| Stillman Tigers | 17.62 | 1.83 | 9.65 | 17.62 | 1.19 | |||
| Stony Brook Seawolves | 3.99 | 5.92 | 1.48 | 3.99 | 5.26 | |||
| Syracuse Orange aka Syracuse Orangemen | 3.15 | 12.88 | 4.08 | 3.15 | 6.66 | |||
| Temple Owls | X | 7.99 | 7.99 | 2.63 | ||||
| Tennessee State Tigers | X | 10.86 | 10.86 | 1.93 | ||||
| Tennessee Tech Golden Eagles | 10.37 | 1.51 | 6.86 | 10.37 | 2.02 | |||
| Tennessee Volunteers aka Tennessee Lady Volunteers | X | 2.63 | 2.63 | 7.99 | ||||
| Tennessee–Martin Skyhawks aka Tennessee-Martin Skyhawks | 15.29 | 2.49 | 6.15 | 15.29 | 1.37 | |||
| Texas A&M Aggies | X | 15.66 | 15.66 | 1.34 | ||||
| Texas A&M–Corpus Christi Islanders | 5.12 | 5.61 | 1.1 | 5.12 | 4.11 | |||
| Texas A&M–Kingsville Javelinas | 10.86 | 1.51 | 7.18 | 10.86 | 1.93 | |||
| Texas Christian University Horned Frogs aka TCU Horned Frogs | X | 12.13 | 12.13 | 1.73 | ||||
| Texas Longhorns | X | 4.59 | 4.59 | 4.58 | ||||
| Texas Southern Tigers aka Texas Southern Lady Tigers | 5.74 | 10.95 | 1.91 | 5.74 | 3.66 | |||
| Texas State Bobcats | 14.61 | 4.48 | 3.26 | 14.61 | 1.44 | |||
| Texas Tech Red Raiders aka Texas Tech Lady Raiders | 5.89 | 21 | 3.57 | 5.89 | 3.57 | |||
| Toledo Rockets | 13.97 | 1.43 | 9.75 | 13.97 | 1.5 | |||
| Towson Tigers | X | 13.89 | 21 | 1 | ||||
| Troy Trojans | 9.63 | 21 | 2.18 | 9.63 | 2.18 | |||
| Truman Bulldogs | X | 10.4 | 10.4 | 2.02 | ||||
| Tulane Green Wave | 14.67 | 1.41 | 10.37 | 14.67 | 1.43 | |||
| Tulsa Golden Hurricane | 4.52 | 2.84 | 1.59 | 7.55 | 2.78 | |||
| Tuskegee Golden Tigers | X | 2.45 | 4.99 | 4.21 | ||||
| UAB Blazers | 6.4 | 1.72 | 3.73 | 6.4 | 3.28 | |||
| UBC Thunderbirds | 6.08 | 1.55 | 3.91 | 6.08 | 3.45 | |||
| UC Davis Aggies | 14.64 | 2.65 | 5.51 | 14.64 | 1.43 | |||
| UC Irvine Anteaters | 6.25 | 1.45 | 4.31 | 6.25 | 3.36 | |||
| UC Riverside Highlanders | 5.23 | 1.99 | 2.63 | 5.23 | 4.02 | |||
| UC Santa Barbara Gauchos | 9.85 | 1.97 | 4.99 | 9.85 | 2.13 | |||
| UCF Knights | 21 | 2.61 | 8.03 | 21 | 1 | |||
| UCLA Bruins | 4.27 | 1.7 | 2.52 | 4.27 | 4.92 | |||
| UConn Huskies | X | 19.02 | 19.02 | 1.1 | ||||
| UIC Flames | 12.61 | 5.81 | 2.17 | 12.61 | 1.67 | |||
| UMBC Retrievers | 21 | 1.62 | 12.98 | 21 | 1 | |||
| UMSL Tritons | 6.85 | 1.91 | 3.59 | 6.85 | 3.07 | |||
| UMass Lowell River Hawks | 7.63 | 4.75 | 1.61 | 7.63 | 2.75 | |||
| UMass Minutemen aka UMass Minutewomen | X | 10.95 | 10.95 | 1.92 | ||||
| UNC Wilmington Seahawks | 6.87 | 1.31 | 5.23 | 6.87 | 3.06 | |||
| UNLV Rebels aka UNLV Runnin' Rebels aka UNLV Lady Rebels | 6.41 | 5.74 | 1.12 | 6.41 | 3.28 | |||
| USC Trojans | 8.92 | 1.51 | 5.9 | 8.92 | 2.35 | |||
| USC Upstate Spartans | X | 9.01 | 9.01 | 2.33 | ||||
| UT Arlington Mavericks | X | 2.63 | 2.63 | 8 | ||||
| UTEP Miners aka Texas Western Miners | 3.19 | 16.05 | 5.03 | 3.19 | 6.58 | |||
| UTPA Broncs | 9.72 | 2.87 | 3.39 | 9.72 | 2.16 | |||
| UTSA Roadrunners | 15.79 | 3.37 | 4.68 | 15.79 | 1.33 | |||
| UW-EAU Claire Blugolds | X | 11.33 | 16.01 | 1.31 | ||||
| UW-Green Bay Phoenix | X | 7.12 | 7.12 | 2.95 | ||||
| Union Dutchmen aka Union Dutchwomen | X | 9.05 | 9.05 | 2.32 | ||||
| Utah State Aggies | X | 12.61 | 12.61 | 1.67 | ||||
| Utah Utes | X | 5.89 | 5.89 | 3.57 | ||||
| Utah Valley Wolverines | 7.39 | 1.46 | 5.06 | 7.39 | 2.84 | |||
| VCU Rams | 21 | 1.71 | 12.28 | 21 | 1 | |||
| VMI Keydets | 5.1 | 1.66 | 3.07 | 5.1 | 4.12 | |||
| Valparaiso Crusaders | 15.44 | 1.51 | 10.21 | 15.44 | 1.36 | |||
| Vanderbilt Commodores | 21 | 3.85 | 5.46 | 21 | 1 | |||
| Vermont Catamounts | 7.02 | 1.55 | 4.51 | 7.02 | 2.99 | |||
| Villanova Wildcats | 12.61 | 3.26 | 3.86 | 12.61 | 1.67 | |||
| Virginia Cavaliers | 15.82 | 2.96 | 5.34 | 15.82 | 1.33 | |||
| Virginia Tech Hokies | 11.47 | 2.83 | 4.05 | 11.47 | 1.83 | |||
| Wake Forest Demon Deacons | 3.82 | 21 | 5.5 | 3.82 | 5.5 | |||
| Washburn Ichabods | X | 12.27 | 12.27 | 1.71 | ||||
| Washington Huskies | 10.22 | 1.47 | 6.94 | 10.22 | 2.06 | |||
| Washington State Cougars | 8.18 | 5.56 | 1.47 | 8.18 | 2.57 | |||
| Washington University Bears aka WUSTL Bears | 5.8 | 8.45 | 1.46 | 5.8 | 3.62 | |||
| Washington and Lee Generals aka Washington & Lee Generals | X | 14.66 | 14.66 | 1.43 | ||||
| Wayne State Warriors | 7.29 | 1.56 | 4.68 | 7.29 | 2.88 | |||
| Weber State Wildcats | X | 7.38 | 7.38 | 2.84 | ||||
| West Alabama Tigers | X | 4 | 4 | 5.25 | ||||
| West Liberty State Hilltoppers | X | 19.56 | 21 | 1 | ||||
| West Texas A&M Buffaloes | 13.42 | 5.74 | 2.34 | 13.42 | 1.56 | |||
| West Virginia Mountaineers | 14.64 | 2.05 | 7.14 | 14.64 | 1.43 | |||
| Western Carolina Catamounts | X | 4.27 | 9.84 | 2.13 | ||||
| Western Illinois Leathernecks | X | 5.26 | 7.38 | 2.84 | ||||
| Western Kentucky Hilltoppers aka WKU Lady Toppers aka WKU Hilltoppers | X | 6.87 | 6.87 | 3.06 | ||||
| Western Michigan Broncos | 13.85 | 2.77 | 5 | 13.85 | 1.52 | |||
| Western Ontario Mustangs | X | 9.42 | 9.42 | 2.23 | ||||
| Western Oregon Wolves | X | 4 | 4 | 5.25 | ||||
| Wichita State Shockers | 21 | 1.61 | 13.07 | 21 | 1 | |||
| Willamette Bearcats | X | 2.87 | 5.84 | 3.59 | ||||
| William & Mary Tribe | 8.53 | 1.88 | 4.54 | 8.53 | 2.46 | |||
| Windsor Lancers | X | 9.31 | 13.75 | 1.53 | ||||
| Wisconsin Badgers | X | 6.96 | 6.96 | 3.02 | ||||
| Wisconsin–Whitewater Warhawks | X | 13.65 | 13.65 | 1.54 | ||||
| Wofford Terriers | 4.16 | 21 | 5.05 | 4.16 | 5.05 | |||
| Wright State Raiders | 7.46 | 1.4 | 5.32 | 7.46 | 2.82 | |||
| Wyoming Cowboys | 11.15 | 1.56 | 7.14 | 11.15 | 1.88 | |||
| Xavier Musketeers | X | 15.46 | 15.46 | 1.36 | ||||
| Yale Bulldogs | X | 8.41 | 8.41 | 2.5 | ||||
| Youngstown State Penguins | X | 6.49 | 6.49 | 3.23 | ||||
| Free agent | X | 15.31 | 1.37 | 15.31 | ||||
| Retired | X | 15.31 | 1.37 | 15.31 | ||||
| Zgornja dokumentacija je vključena iz Modul:College color/dok. (uredi | zgodovina) Urejevalci lahko preizkušate ta modul v peskovniku (ustvari | mirror) in testnihprimerih (ustvari). Prosimo, da dodate kategorije v /dok podstran. Podstrani te predloge. |
--
-- This module implements {{CollegePrimaryHex}}, {{CollegePrimaryStyle}},
-- {{CollegePrimaryColorLink}}, {{CollegeSecondaryHex}},
-- {{CollegeSecondaryStyle}}, {{CollegeSecondaryColorLink}}, and {{NCAA color}}
--
local p = {}
local data_module = "Modul:College color/data"
local function stripwhitespace(text)
return text:match("^%s*(.-)%s*$")
end
local function sRGB ( v )
if (v <= 0.03928) then
v = v / 12.92
else
v = math.pow((v+0.055)/1.055, 2.4)
end
return v
end
local function color2lum( c )
c = stripwhitespace(c or ''):lower()
-- remove leading # (if there is one)
c = mw.ustring.match(c, '^[#]*([a-f0-9]*)$')
-- split into rgb
local cs = mw.text.split(c or '', '')
if( #cs == 6 ) then
local R = sRGB( (16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]))/255 )
local G = sRGB( (16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]))/255 )
local B = sRGB( (16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]))/255 )
L = 0.2126 * R + 0.7152 * G + 0.0722 * B
return L
elseif ( #cs == 3 ) then
local R = sRGB( (16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]))/255 )
local G = sRGB( (16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]))/255 )
local B = sRGB( (16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]))/255 )
L = 0.2126 * R + 0.7152 * G + 0.0722 * B
return L
end
-- failure, return blank
return ''
end
local function get_colors(team, unknown)
team = stripwhitespace(team or '')
unknown = unknown or {"DCDCDC", "000000"}
local use_default = {
[""] = 1,
["retired"] = 1,
["free agent"] = 1,
}
local colors = nil
if ( team and use_default[team:lower()] ) then
colors = {"DCDCDC", "000000"}
else
local all_colors = mw.loadData(data_module)
colors = all_colors[team]
if ( colors and type(colors) == 'string' ) then
colors = all_colors[colors]
end
end
return colors or unknown
end
local function team_color(team, num, num2)
local colors = get_colors(team, nil)
num = tonumber(num:match('[1-3]') or '0')
num2 = tonumber(num2:match('[1-3]') or '0')
if ( num ) then
return colors[num] or colors[num2] or ''
else
return ''
end
end
local function team_style1(team, borderwidth, fontcolor)
local colors = get_colors(team, nil)
local color = '#' .. (colors[3] or colors[2] or '')
local style = 'background-color:#' .. (colors[1] or '') .. ';color:' .. (fontcolor or color) .. ';'
borderwidth = tonumber(borderwidth or '2') or 0
if (borderwidth > 0 and color ~= '#FFFFFF') then
style = style .. ' border:' .. borderwidth .. 'px solid ' .. color .. ';'
end
return style
end
local function team_style2(team, borderwidth, fontcolor)
local colors = get_colors(team, nil)
local color = '#' .. (colors[1] or '')
local style = 'background-color:#' .. (colors[3] or colors[2] or '') .. ';color:' .. (fontcolor or color) .. ';'
borderwidth = tonumber(borderwidth or '2') or 0
if (borderwidth > 0 and color ~= '#FFFFFF') then
style = style .. ' border:' .. borderwidth .. 'px solid ' .. color .. ';'
end
return style
end
local function team_header1(team)
local colors = get_colors(team, nil)
-- set the default background
local background = (colors[1] or 'FFFFFF'):upper()
-- set background to white if it's nearly white
if ((1 + 0.05)/(color2lum(background) + 0.05) < 1.25) then
background = 'FFFFFF'
end
-- now pick a font color
local fontcolor = '000000'
-- compute the luminosity of the background
local lum = color2lum(background)
-- compute the contrast with white and black
local wcontrast = (1 + 0.05)/(lum + 0.05)
local bcontrast = (lum + 0.05)/(0 + 0.05)
-- select the text color with the best contrast
if( bcontrast > wcontrast + 1.25 ) then
fontcolor = '000000'
else
fontcolor = 'FFFFFF'
end
if( background == 'FFFFFF' ) then
return 'background-color:none;color:#' .. fontcolor .. ';'
else
return 'background-color:#' .. background .. ';color:#' .. fontcolor .. ';'
end
end
local function team_header2(team)
local colors = get_colors(team, nil)
-- set the default background
local background = (colors[3] or colors[2] or 'FFFFFF'):upper()
-- set background to white if it's nearly white
if ((1 + 0.05)/(color2lum(background) + 0.05) < 1.25) then
background = 'FFFFFF'
end
-- if the background is white, then use the primary background instead
if( background == 'FFFFFF' ) then
background = (colors[1] or 'FFFFFF'):upper()
end
-- now pick a font color
local fontcolor = '000000'
-- compute the luminosity of the background
local lum = color2lum(background)
-- compute the contrast with white and black
local wcontrast = (1 + 0.05)/(lum + 0.05)
local bcontrast = (lum + 0.05)/(0 + 0.05)
-- select the text color with the best contrast
if( bcontrast > wcontrast + 1.25 ) then
fontcolor = '000000'
else
fontcolor = 'FFFFFF'
end
if( background == 'FFFFFF' ) then
return 'background-color:none;color:#' .. fontcolor .. ';'
else
return 'background-color:#' .. background .. ';color:#' .. fontcolor .. ';'
end
end
local function team_stripe1(team, borderwidth)
local colors = get_colors(team, nil)
-- set the default scheme
local background = colors[1] or ''
local fontcolor = colors[2] or ''
local bordercolor = (colors[3] or colors[2] or ''):upper()
borderwidth = tonumber(borderwidth or '3') or 0
-- if there is no tertiary color, then pick a font color
if (colors[3] == nil) then
-- compute the luminosity of the background
local lum = color2lum(colors[1])
-- compute the contrast with white and black
local wcontrast = (1 + 0.05)/(lum + 0.05)
local bcontrast = (lum + 0.05)/(0 + 0.05)
-- select the text color with the best contrast
if( bcontrast > wcontrast + 1.25 ) then
fontcolor = '000000'
else
fontcolor = 'FFFFFF'
end
end
-- finally build the style string
local style = ''
if (borderwidth > 0) then
-- use the primary as the border if the border is white or close to white
local bordercontrast = (1 + 0.05)/(color2lum(bordercolor) + 0.05)
if (bordercontrast < 1.25) then
bordercolor = background
local fontcontrast = (1 + 0.05)/(color2lum(colors[2] or 'FFFFFF') + 0.05)
if (fontcontrast < 1.25) then
fontcolor = colors[2] or 'FFFFFF'
end
end
style = style .. ' border:' .. borderwidth .. 'px solid #' .. bordercolor .. ';'
style = style .. ' border-left: none; border-right: none;'
style = style .. ' box-shadow: inset 0 2px 0 #FEFEFE, inset 0 -2px 0 #FEFEFE;'
end
style = 'background-color:#' .. background .. ';color:#' .. fontcolor .. ';' .. style
return style
end
local function team_check(team, unknown)
local colors = get_colors(team, unknown)
if type(colors) == 'table' then
return 'known'
else
return unknown
end
end
function p.color(frame)
local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args
return team_color(args[1] or '', args[2] or '', args[3] or '')
end
function p.color1(frame)
local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args
return team_color(args[1] or '', '1', '')
end
function p.color32(frame)
local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args
return team_color(args[1] or '', '3', '2')
end
function p.style1(frame)
local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args
return team_style1(args[1] or '', args['border'], args['color'])
end
function p.style2(frame)
local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args
return team_style2(args[1] or '', args['border'], args['color'])
end
function p.header1(frame)
local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args
return team_header1(args[1] or '')
end
function p.header2(frame)
local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args
return team_header2(args[1] or '')
end
function p.stripe1(frame)
local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args
return team_stripe1(args[1] or '', args['border'])
end
function p.check(frame)
local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args
return team_check(args[1] or '', args[2] or '')
end
function p.testtable(frame)
local contrasttable_mod = require("Module:College color/contrast")
return contrasttable_mod._testtable(frame.args)
end
return p