<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.seminaverbi.bibleget.io/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AComplForColorModules</id>
	<title>Module:ComplForColorModules - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.seminaverbi.bibleget.io/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AComplForColorModules"/>
	<link rel="alternate" type="text/html" href="https://en.seminaverbi.bibleget.io/w/index.php?title=Module:ComplForColorModules&amp;action=history"/>
	<updated>2026-04-04T03:50:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://en.seminaverbi.bibleget.io/w/index.php?title=Module:ComplForColorModules&amp;diff=1711&amp;oldid=prev</id>
		<title>Johnrdorazio: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://en.seminaverbi.bibleget.io/w/index.php?title=Module:ComplForColorModules&amp;diff=1711&amp;oldid=prev"/>
		<updated>2020-08-29T21:54:36Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:54, August 29, 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&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;!-- diff cache key seminaverbi_en:diff:1.41:old-1710:rev-1711 --&gt;
&lt;/table&gt;</summary>
		<author><name>Johnrdorazio</name></author>
	</entry>
	<entry>
		<id>https://en.seminaverbi.bibleget.io/w/index.php?title=Module:ComplForColorModules&amp;diff=1710&amp;oldid=prev</id>
		<title>en&gt;Pppery: Replace usage of to-be-deleted Module:SimpleArgs, clean up code with nested functions to be slightly more readable</title>
		<link rel="alternate" type="text/html" href="https://en.seminaverbi.bibleget.io/w/index.php?title=Module:ComplForColorModules&amp;diff=1710&amp;oldid=prev"/>
		<updated>2019-12-09T23:34:52Z</updated>

		<summary type="html">&lt;p&gt;Replace usage of to-be-deleted &lt;a href=&quot;/w/index.php?title=Module:SimpleArgs&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:SimpleArgs (page does not exist)&quot;&gt;Module:SimpleArgs&lt;/a&gt;, clean up code with nested functions to be slightly more readable&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local TNTT = require &amp;quot;Module:TNTTools&amp;quot;&lt;br /&gt;
&lt;br /&gt;
local I18n = &amp;#039;ComplForColorModules&amp;#039;&lt;br /&gt;
&lt;br /&gt;
--local MoreOneNoData = &amp;quot;Found 2 legends of \&amp;quot;Value not assigned\&amp;quot; or \&amp;quot;Data not available\&amp;quot;&amp;quot;&lt;br /&gt;
--local FoundNLegendsExpectedN = &amp;quot;Found $1 legends, expected $2&amp;quot;&lt;br /&gt;
--local Color = &amp;quot;Color&amp;quot;&lt;br /&gt;
--local Legend = &amp;quot;legend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
local function I18nStr (S, ...)&lt;br /&gt;
	return TNTT.GetMsgP (I18n, S, {...})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.ColorNameInvFromS0 (S)&lt;br /&gt;
	local IsInv = false&lt;br /&gt;
	local ColorName = &amp;#039;&amp;#039;&lt;br /&gt;
	local Params = {}&lt;br /&gt;
	if S ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		for w in S:gmatch(&amp;quot;([^_]+)&amp;quot;) do &lt;br /&gt;
	    	table.insert(Params, w)&lt;br /&gt;
		end&lt;br /&gt;
		ColorName = Params[1]&lt;br /&gt;
	end	&lt;br /&gt;
	local PN = table.getn(Params)&lt;br /&gt;
	if (PN == 2) and (Params[2]==&amp;#039;i&amp;#039;) then&lt;br /&gt;
		IsInv = true&lt;br /&gt;
	end	&lt;br /&gt;
	return ColorName, IsInv, Params&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.ColorNameInv (args)&lt;br /&gt;
	local ColorName, IsInv, Params = p.ColorNameInvFromS0(args[1])&lt;br /&gt;
	return ColorName, IsInv			    	&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
function p.GetLabels(Args, N, Pos)&lt;br /&gt;
    local Labels = {}&lt;br /&gt;
    local index = Pos&lt;br /&gt;
    while Args[index] do&lt;br /&gt;
    	Labels[#Labels+1] = Args[index]&lt;br /&gt;
    	index = index + 1&lt;br /&gt;
    end&lt;br /&gt;
    local NLabels = #Labels&lt;br /&gt;
    local OutlineColor = Args[&amp;#039;outline&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
    if (NLabels ~= 0) and (NLabels ~= N) then&lt;br /&gt;
    	local StartUnknown = (string.sub(Labels[1],1,2) == &amp;quot;--&amp;quot;)&lt;br /&gt;
    	local EndUnknown = (string.sub(Labels[NLabels],1,2) == &amp;quot;--&amp;quot;)&lt;br /&gt;
    	if StartUnknown and EndUnknown then&lt;br /&gt;
	    	error (I18nStr (&amp;#039;MoreOneNoData&amp;#039;))&lt;br /&gt;
    	elseif StartUnknown or EndUnknown then&lt;br /&gt;
    		N = N + 1&lt;br /&gt;
    	end	&lt;br /&gt;
		if (NLabels ~= 0) and (NLabels ~= N) then&lt;br /&gt;
	    	error (I18nStr (&amp;#039;FoundNLegendsExpectedN&amp;#039;, tostring(NLabels), tostring(N)))&lt;br /&gt;
	    end&lt;br /&gt;
	end&lt;br /&gt;
    return Labels, NLabels, OutlineColor&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SColor (Color)&lt;br /&gt;
	if string.sub(Color,1,1) == &amp;#039;#&amp;#039; then --the usual&lt;br /&gt;
		return string.sub(Color,2,100)&lt;br /&gt;
	else&lt;br /&gt;
		return Color&lt;br /&gt;
	end	&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
function p.Box(Color,WriteColor)&lt;br /&gt;
	if WriteColor == &amp;#039;-&amp;#039; then &lt;br /&gt;
		WriteColor = Color&lt;br /&gt;
	elseif WriteColor == &amp;#039;a&amp;#039; then 	&lt;br /&gt;
		WriteColor = Color..&amp;#039;ff&amp;#039; --Alpha channel&lt;br /&gt;
	end	&lt;br /&gt;
	local TheBox = &amp;#039;&amp;lt;span style=&amp;quot;background-color:&amp;#039;..Color..&amp;#039;; border:1px solid gray;&amp;quot; title=&amp;quot;&amp;#039;..TNTT.GetStrP(I18n,&amp;#039;Color&amp;#039;)..&amp;#039;: &amp;#039;..SColor(Color)..&amp;#039;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;#039;	&lt;br /&gt;
	if WriteColor ~=&amp;#039;&amp;#039; then &lt;br /&gt;
		TheBox = TheBox..&amp;#039;&amp;amp;nbsp;&amp;#039;..WriteColor..&amp;#039; &amp;amp;nbsp;&amp;#039;&lt;br /&gt;
	end	&lt;br /&gt;
	return TheBox&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
function p.TextWithTooltip (Text, Tooltip)&lt;br /&gt;
	if Tooltip ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		return &amp;#039;&amp;lt;span title=&amp;quot;&amp;#039;..Tooltip..&amp;#039;&amp;quot;&amp;gt;&amp;#039;..Text..&amp;#039;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		return Text&lt;br /&gt;
	end	&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
function p.LegendColor(Color, Text, Tooltip)&lt;br /&gt;
	if Text == &amp;#039;&amp;#039; then&lt;br /&gt;
		Text = SColor(Color)&lt;br /&gt;
	end	&lt;br /&gt;
	return &amp;#039;&amp;lt;li style=&amp;quot;list-style-type: none; list-style-image: none;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;border:1px solid gray; background:&amp;#039;..Color..&amp;#039;; margin-right:0.3em; vertical-align: middle; webkit-print-color-adjust:exact; color-adjust:exact; display:inline-block; width:1.05em; height:1em;&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;#039;..p.TextWithTooltip(Text,Tooltip)..&amp;#039;&amp;lt;/li&amp;gt;&amp;#039;&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
function LegendCode(Color, Text, OutlineColor)&lt;br /&gt;
	local SOutlineColor = &amp;#039;&amp;#039;&lt;br /&gt;
	if OutlineColor ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		SOutlineColor = &amp;#039;|outline=&amp;#039;..OutlineColor&lt;br /&gt;
	end	&lt;br /&gt;
	return &amp;#039;{{&amp;#039;..TNTT.GetStrP(I18n,&amp;#039;Legend&amp;#039;)..&amp;#039;|&amp;#039;..Color..&amp;#039;|&amp;#039;..Text..SOutlineColor..&amp;#039;}}&amp;#039;&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
function p.LegendText (AColors, Labels, NLabels, ColWidth, IsTemplate, OutlineColor)&lt;br /&gt;
	if ColWidth then &lt;br /&gt;
		ColWidth = mw.text.trim(ColWidth)&lt;br /&gt;
		if #ColWidth == 0 then&lt;br /&gt;
			ColWidth = nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local Show, Codes = {}, {}&lt;br /&gt;
	local Text = &amp;#039;&amp;#039;&lt;br /&gt;
	local WithLabels = NLabels &amp;gt; 0&lt;br /&gt;
	if WithLabels then&lt;br /&gt;
		local Gray = &amp;#039;#b3b3b3&amp;#039; -- A 40% gray&lt;br /&gt;
		if string.sub(Labels[1],1,2) == &amp;#039;--&amp;#039; then&lt;br /&gt;
			table.insert(AColors, 1, Gray) &lt;br /&gt;
			Labels[1] = string.sub(Labels[1], 3, 1000)&lt;br /&gt;
		elseif string.sub(Labels[NLabels],1,2) == &amp;#039;--&amp;#039; then&lt;br /&gt;
			table.insert(AColors, Gray) &lt;br /&gt;
			Labels[NLabels] = string.sub(Labels[NLabels], 3, 1000)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i=1, table.getn(AColors) do&lt;br /&gt;
		if WithLabels then Text = Labels[i] end&lt;br /&gt;
		table.insert(Show, p.LegendColor(AColors[i],Text,&amp;#039;&amp;#039;))&lt;br /&gt;
	end	&lt;br /&gt;
	SShow = table.concat(Show,&amp;quot;\n&amp;quot;)&lt;br /&gt;
	if ColWidth then &lt;br /&gt;
		local frame = mw.getCurrentFrame()&lt;br /&gt;
		SShow = frame:expandTemplate{title=&amp;quot;div col&amp;quot;,args={colwidth=ColWidth}} .. SShow&lt;br /&gt;
		SShow = SShow .. frame:expandTemplate{title=&amp;quot;div col end&amp;quot;}&lt;br /&gt;
	end&lt;br /&gt;
	for i=1, table.getn(AColors) do&lt;br /&gt;
		if WithLabels then Text = Labels[i] end&lt;br /&gt;
		table.insert(Codes, &amp;#039; &amp;#039;..LegendCode(AColors[i],Text,OutlineColor))&lt;br /&gt;
	end	&lt;br /&gt;
	local SCodes = &amp;#039;&amp;lt;pre&amp;gt;\n&amp;#039;&lt;br /&gt;
	if ColWidth then&lt;br /&gt;
		SCodes = SCodes .. require(&amp;quot;Module:Template invocation&amp;quot;).invocation(&amp;quot;div col&amp;quot;,{colwidth=ColWidth}) .. &amp;quot;\n&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	SCodes = SCodes .. table.concat(Codes,&amp;quot;\n&amp;quot;)&lt;br /&gt;
	if ColWidth and #ColWidth ~= 0 then&lt;br /&gt;
		SCodes = SCodes .. &amp;quot;\n{{div col end}}&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	SCodes = SCodes .. &amp;quot;\n&amp;lt;/pre&amp;gt;&amp;quot;&lt;br /&gt;
	return SShow..&amp;#039;\n&amp;#039;..SCodes&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>en&gt;Pppery</name></author>
	</entry>
</feed>