<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.agency/index.php?action=history&amp;feed=atom&amp;title=Module%3ASports_color</id>
		<title>Module:Sports color - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.agency/index.php?action=history&amp;feed=atom&amp;title=Module%3ASports_color"/>
		<link rel="alternate" type="text/html" href="https://wiki.agency/index.php?title=Module:Sports_color&amp;action=history"/>
		<updated>2026-05-01T00:01:56Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.1</generator>

	<entry>
		<id>https://wiki.agency/index.php?title=Module:Sports_color&amp;diff=8715&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.agency/index.php?title=Module:Sports_color&amp;diff=8715&amp;oldid=prev"/>
				<updated>2018-11-04T20:37:51Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:37, 4 November 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>https://wiki.agency/index.php?title=Module:Sports_color&amp;diff=8714&amp;oldid=prev</id>
		<title>Frietjes at 14:55, 16 July 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.agency/index.php?title=Module:Sports_color&amp;diff=8714&amp;oldid=prev"/>
				<updated>2018-07-16T14:55:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--&lt;br /&gt;
-- This module implements&lt;br /&gt;
-- {{NBA color}}, {{NBA color cell}}, {{NBA color cell2}}&lt;br /&gt;
-- {{Euroleague color}}, {{Euroleague color cell}}, {{Euroleague color cell2}}, &lt;br /&gt;
-- {{NBL colour}}, {{NBL colour cell}}, {{NBL colour cell2}},&lt;br /&gt;
-- {{PBA color}}, {{PBA color cell}}, {{PBA color cell2}},&lt;br /&gt;
-- {{European leagues color}}, {{European leagues color cell}}, {{European leagues color cell2}},&lt;br /&gt;
-- {{KBL color}}, {{KBL color cell}}, {{KBL color cell2}}&lt;br /&gt;
--&lt;br /&gt;
-- {{Baseball color}}, {{Baseball primary color}}, {{Baseball secondary color}}, &lt;br /&gt;
-- {{Baseball alternative primary color}}, {{Baseball alternative secondary color}}&lt;br /&gt;
-- {{Baseball primary style}}, {{Baseball secondary style}}&lt;br /&gt;
--&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local data_module = &amp;#039;Module:Sports color/basketball&amp;#039;&lt;br /&gt;
&lt;br /&gt;
local function stripwhitespace(text)&lt;br /&gt;
	return text:match(&amp;quot;^%s*(.-)%s*$&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function bordercss(c, w)&lt;br /&gt;
	local s = &amp;#039;inset &amp;#039; .. w .. &amp;#039;px &amp;#039; .. w .. &amp;#039;px 0 #&amp;#039; .. c &lt;br /&gt;
		.. &amp;#039;, inset -&amp;#039; .. w .. &amp;#039;px -&amp;#039; .. w .. &amp;#039;px 0 #&amp;#039; .. c&lt;br /&gt;
	return &amp;#039;-moz-box-shadow: &amp;#039; .. s .. &amp;#039;; -webkit-box-shadow: &amp;#039; .. s .. &amp;#039;; box-shadow: &amp;#039; .. s .. &amp;#039;;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function get_colors(team, unknown)&lt;br /&gt;
	team = stripwhitespace(team or &amp;#039;&amp;#039;)&lt;br /&gt;
	unknown = unknown or {&amp;quot;DCDCDC&amp;quot;, &amp;quot;000000&amp;quot;, &amp;quot;000000&amp;quot;, &amp;quot;FFFFFF&amp;quot;}&lt;br /&gt;
	&lt;br /&gt;
	local use_default = {&lt;br /&gt;
		[&amp;quot;&amp;quot;] = 1,&lt;br /&gt;
		[&amp;quot;retired&amp;quot;] = 1,&lt;br /&gt;
		[&amp;quot;free agent&amp;quot;] = 1,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	local colors = nil&lt;br /&gt;
	&lt;br /&gt;
	if ( team and use_default[team:lower()] ) then&lt;br /&gt;
		colors = {&amp;quot;DCDCDC&amp;quot;, &amp;quot;000000&amp;quot;, &amp;quot;DCDCDC&amp;quot;, &amp;quot;000000&amp;quot;}&lt;br /&gt;
	else&lt;br /&gt;
		local all_colors = mw.loadData(data_module)&lt;br /&gt;
		colors = all_colors[team]&lt;br /&gt;
		if ( colors and type(colors) == &amp;#039;string&amp;#039; ) then&lt;br /&gt;
			colors = all_colors[colors]&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return colors or unknown&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function team_check(team, unknown)&lt;br /&gt;
	local colors = get_colors(team, unknown)&lt;br /&gt;
	if type(colors) == &amp;#039;table&amp;#039; then&lt;br /&gt;
		return &amp;#039;known&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		return unknown&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function team_color(team, num)&lt;br /&gt;
	local colors = get_colors(team, nil)&lt;br /&gt;
&lt;br /&gt;
	num = tonumber(num:match(&amp;#039;[1-4]&amp;#039;) or &amp;#039;0&amp;#039;)&lt;br /&gt;
	if ( num ) then&lt;br /&gt;
		return colors[num]&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function team_colorcell(team, borderwidth, bg, fg, bd, simple)&lt;br /&gt;
	local colors = get_colors(team, nil)&lt;br /&gt;
	local border = &amp;#039;&amp;#039;&lt;br /&gt;
	borderwidth = borderwidth or &amp;#039;&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	if (borderwidth ~= &amp;#039;&amp;#039;) then&lt;br /&gt;
		local bordercolor = stripwhitespace(colors[bd]) or &amp;#039;FFFFFF&amp;#039;&lt;br /&gt;
		if bordercolor ~= &amp;#039;FFFFFF&amp;#039; then&lt;br /&gt;
			if simple then&lt;br /&gt;
				border = &amp;#039;border:&amp;#039; .. borderwidth .. &amp;#039;px solid #&amp;#039; .. bordercolor .. &amp;#039;;&amp;#039;&lt;br /&gt;
			else&lt;br /&gt;
				border = bordercss(bordercolor, borderwidth)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return &amp;#039;background-color:#&amp;#039; .. stripwhitespace(colors[bg]) .. &amp;#039;;color:#&amp;#039; .. stripwhitespace(colors[fg]) .. &amp;#039;;&amp;#039; .. border&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.check(frame)&lt;br /&gt;
	local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args&lt;br /&gt;
	data_module = &amp;#039;Module:Sports color/&amp;#039; .. (frame.args[&amp;#039;sport&amp;#039;] or frame:getParent().args[&amp;#039;sport&amp;#039;] or &amp;#039;basketball&amp;#039;)&lt;br /&gt;
	return team_check(args[1] or &amp;#039;&amp;#039;, args[2] or &amp;#039;&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.color(frame)&lt;br /&gt;
	local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args&lt;br /&gt;
	data_module = &amp;#039;Module:Sports color/&amp;#039; .. (frame.args[&amp;#039;sport&amp;#039;] or frame:getParent().args[&amp;#039;sport&amp;#039;] or &amp;#039;basketball&amp;#039;)&lt;br /&gt;
	return team_color(args[1] or &amp;#039;&amp;#039;, args[2] or &amp;#039;&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.colorcell(frame)&lt;br /&gt;
	local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args&lt;br /&gt;
	data_module = &amp;#039;Module:Sports color/&amp;#039; .. (frame.args[&amp;#039;sport&amp;#039;] or frame:getParent().args[&amp;#039;sport&amp;#039;] or &amp;#039;basketball&amp;#039;)&lt;br /&gt;
	return team_colorcell(args[1] or &amp;#039;&amp;#039;, args[&amp;#039;border&amp;#039;] or &amp;#039;&amp;#039;, 1, 2, 3, args[&amp;#039;simple&amp;#039;] and 1 or nil )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.colorcell2(frame)&lt;br /&gt;
	local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args&lt;br /&gt;
	data_module = &amp;#039;Module:Sports color/&amp;#039; .. (frame.args[&amp;#039;sport&amp;#039;] or frame:getParent().args[&amp;#039;sport&amp;#039;] or &amp;#039;basketball&amp;#039;)&lt;br /&gt;
	return team_colorcell(args[1] or &amp;#039;&amp;#039;, args[&amp;#039;border&amp;#039;] or &amp;#039;&amp;#039;, 3, 4, 1, args[&amp;#039;simple&amp;#039;] and 1 or nil )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Frietjes</name></author>	</entry>

	</feed>