<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://arbundi.eu/index.php?action=history&amp;feed=atom&amp;title=Module%3AValue_color</id>
	<title>Module:Value color - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://arbundi.eu/index.php?action=history&amp;feed=atom&amp;title=Module%3AValue_color"/>
	<link rel="alternate" type="text/html" href="https://arbundi.eu/index.php?title=Module:Value_color&amp;action=history"/>
	<updated>2026-05-02T18:09:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.4</generator>
	<entry>
		<id>https://arbundi.eu/index.php?title=Module:Value_color&amp;diff=660&amp;oldid=prev</id>
		<title>Arbundi: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://arbundi.eu/index.php?title=Module:Value_color&amp;diff=660&amp;oldid=prev"/>
		<updated>2023-08-06T00:09:48Z</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;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:09, 6 August 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&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;/table&gt;</summary>
		<author><name>Arbundi</name></author>
	</entry>
	<entry>
		<id>https://arbundi.eu/index.php?title=Module:Value_color&amp;diff=659&amp;oldid=prev</id>
		<title>wikipedia&gt;BrandonXLF: Restored revision 1029982899 by Guarapiranga (Restorer)</title>
		<link rel="alternate" type="text/html" href="https://arbundi.eu/index.php?title=Module:Value_color&amp;diff=659&amp;oldid=prev"/>
		<updated>2022-01-09T02:08:11Z</updated>

		<summary type="html">&lt;p&gt;Restored revision 1029982899 by &lt;a href=&quot;/index.php?title=Special:Contributions/Guarapiranga&quot; title=&quot;Special:Contributions/Guarapiranga&quot;&gt;Guarapiranga&lt;/a&gt; (&lt;a href=&quot;/index.php?title=User:BrandonXLF/Restorer&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:BrandonXLF/Restorer (page does not exist)&quot;&gt;Restorer&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function rgb(color)&lt;br /&gt;
	local _, _, R, G, B = color:find(&amp;#039;(%w%w)(%w%w)(%w%w)&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	return tonumber(R, 16), tonumber(G, 16), tonumber(B, 16)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	local value = tonumber(args[1])&lt;br /&gt;
	local minValue = tonumber(args[2])&lt;br /&gt;
	local maxValue = tonumber(args[3])&lt;br /&gt;
	&lt;br /&gt;
	if value == nil or minValue == nil or maxValue == nil then&lt;br /&gt;
		return require(&amp;#039;Module:Error&amp;#039;).error{&amp;#039;Parameters 1, 2, and 3 are required and must be numbers.&amp;#039;}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local minR, minG, minB = rgb(args[4] or &amp;#039;FFFFFF&amp;#039;)&lt;br /&gt;
	local maxR, maxG, maxB = rgb(args[5] or &amp;#039;000000&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	local percent = math.max(0, math.min(1, (value - minValue) / (maxValue - minValue)))&lt;br /&gt;
&lt;br /&gt;
	local red = minR + ((maxR - minR) * percent)&lt;br /&gt;
	local green = minG + ((maxG - minG) * percent)&lt;br /&gt;
	local blue = minB + ((maxB - minB) * percent)&lt;br /&gt;
&lt;br /&gt;
	if args[&amp;#039;hex&amp;#039;] then&lt;br /&gt;
		return string.format(&amp;#039;&amp;amp;num;%x%x%x&amp;#039;, red, green, blue)&lt;br /&gt;
	else&lt;br /&gt;
		return string.format(&amp;#039;rgb(%.0f,%.0f,%.0f)&amp;#039;, red, green, blue)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;BrandonXLF</name></author>
	</entry>
</feed>