<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FNbound%2Finfobox_Australian_road%2FColour</id>
	<title>Module:Sandbox/Nbound/infobox Australian road/Colour - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FNbound%2Finfobox_Australian_road%2FColour"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Nbound/infobox_Australian_road/Colour&amp;action=history"/>
	<updated>2026-04-21T09:09:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/Nbound/infobox_Australian_road/Colour&amp;diff=145906&amp;oldid=prev</id>
		<title>imported&gt;Nbound: ←Created page with &#039;local p = {}  function p.Colour(frame)     local pframe = frame:getParent()     local config = frame.args -- the arguments passed BY the template, in the wikitex...&#039;</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Nbound/infobox_Australian_road/Colour&amp;diff=145906&amp;oldid=prev"/>
		<updated>2013-07-20T06:34:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=WP:AES&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:AES (page does not exist)&quot;&gt;←&lt;/a&gt;Created page with &amp;#039;local p = {}  function p.Colour(frame)     local pframe = frame:getParent()     local config = frame.args -- the arguments passed BY the template, in the wikitex...&amp;#039;&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;
function p.Colour(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template&lt;br /&gt;
    local roadclosed = args[&amp;quot;uc_former&amp;quot;] or &amp;quot;&amp;quot; -- get special status (closed/uc)&lt;br /&gt;
    local roadtype = args[&amp;quot;type&amp;quot;] or &amp;quot;&amp;quot; -- get road type&lt;br /&gt;
    roadclosed = string.lower(roadclosed) -- change roadclosed to lower case&lt;br /&gt;
    roadtype = string.lower(roadtype) -- change roadtype to lower case&lt;br /&gt;
    roadclosed = string.gsub(roadclosed, &amp;quot;%s+&amp;quot;, &amp;quot;_&amp;quot;) --remove spaces and replace with underscores for table access&lt;br /&gt;
    roadtype = string.gsub(roadtype, &amp;quot;%s+&amp;quot;, &amp;quot;_&amp;quot;) --remove spaces and replace with underscores for table access&lt;br /&gt;
    local colours = {under_construction = &amp;quot;background-color:#fc6;&amp;quot;, uc = &amp;quot;background-color:#fc6;&amp;quot;, closed = &amp;quot;background-color:#aaa;&amp;quot;, &lt;br /&gt;
        highway = &amp;quot;background-color:#e9f9d2;&amp;quot;, city_highway = &amp;quot;background-color:#e9f9d2;&amp;quot;, road = &amp;quot;background-color:#ffffe0;&amp;quot;,&lt;br /&gt;
        rural_road = &amp;quot;background-color:#ffffe0;&amp;quot;, street = &amp;quot;background-color:#f9e2d2;&amp;quot;, expressway = &amp;quot;background-color:#d2e2f9;&amp;quot;,&lt;br /&gt;
        freeway = &amp;quot;background-color:#d2e2f9;&amp;quot;, motorway = &amp;quot;background-color:#d2e2f9;&amp;quot;, parkway = &amp;quot;background-color:#d2e2f9;&amp;quot;,&lt;br /&gt;
        track = &amp;quot;background-color:#fee8ab;&amp;quot;, junction = &amp;quot;background-color:#f0f0ff;&amp;quot;}&lt;br /&gt;
    if not(roadtype) and not(roadclosed) then&lt;br /&gt;
        return &amp;quot;background-color: #e6c4fb;&amp;quot; -- if inputs missing, go purple&lt;br /&gt;
    elseif roadclosed and colours[roadclosed] then&lt;br /&gt;
        return colours[roadclosed]  -- if road has a special type, and if it makes sense get return colour&lt;br /&gt;
    elseif roadtype and colours[roadtype] then&lt;br /&gt;
        return colours[roadtype]  -- otherwise check the type makes sense, and get return colour&lt;br /&gt;
    else&lt;br /&gt;
        return &amp;quot;background-color: #e6c4fb;&amp;quot; -- all other cases go purple&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Nbound</name></author>
	</entry>
</feed>