<?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%2FKeyacom%2Fishexcode</id>
	<title>Module:Sandbox/Keyacom/ishexcode - 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%2FKeyacom%2Fishexcode"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Keyacom/ishexcode&amp;action=history"/>
	<updated>2026-05-27T10:36:06Z</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/Keyacom/ishexcode&amp;diff=145662&amp;oldid=prev</id>
		<title>imported&gt;Keyacom at 07:50, 19 April 2022</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Keyacom/ishexcode&amp;diff=145662&amp;oldid=prev"/>
		<updated>2022-04-19T07:50:51Z</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;-- This is for checking if the input is a color hex code.&lt;br /&gt;
-- Feel free to correct errors, but notify me (Keyacom) on the talk page.&lt;br /&gt;
&lt;br /&gt;
local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
p.ishex = function(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	if string.match(args[1],&amp;quot;#[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]$&amp;quot;) ~= nil then&lt;br /&gt;
--[=[ In short, this would be the same as the regex&lt;br /&gt;
     /#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.&lt;br /&gt;
However, Lua&amp;#039;s limitations do not allow for such regexes.]=]&lt;br /&gt;
    	return args[2] or true&lt;br /&gt;
	elseif string.match(args[1],&amp;quot;#[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]$&amp;quot;) ~= nil then&lt;br /&gt;
		return args[2] or true&lt;br /&gt;
	elseif string.match(args[1],&amp;quot;#[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]?$&amp;quot;) ~= nil then -- in Lua, ? still works on character sets&lt;br /&gt;
		return args[2] or true&lt;br /&gt;
	else&lt;br /&gt;
	    return args[3] or &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Keyacom</name></author>
	</entry>
</feed>