FANDOM


 
local p = {}
 
local color = {
	["Very Easy"] = {'#000000', '#00FFFF'},
	["Easy"] = {'#FFFFFF', '#008080'},
	["Somewhat Easy"] = {'#FFFFFF', '#00A000'},
	["Medium"] = {'#000000', '#FFC800'},
	["Somewhat Hard"] = {'#000000', '#FF8800'},
	["Hard"] = {'#FFFFFF', '#E80000'},
	["Very Hard"] = {'#FFFFFF', '#800000'},
	["Insanely Hard"] = {'#FFFFFF', '#000000'},
	["Impossible"] = {'#FFFFFF', '#606060'},
    ["Nearly Impossible"] = {'#FFFFFF', '#000080'},
	["Variable"] = {'#FFFFFF', '#9000A8'}
}
 
local function _getColor( difficulty, forecolor )
 
	local i = 2
	local myColor = ''
 
	if forecolor then i = 1 end
	myColor = color[difficulty]
 
	if myColor then
	    return myColor[i]
	else
	    return ''
	end
end
 
function p.getColor( frame )
    local a = frame.args
    local difficulty = a[1] -- mixed case difficulty, eg. "Very Hard"
    local forecolor = a[2] and not (a[2] == '') -- if second param present, get forecolor, else backcolor
 
	return _getColor(difficulty, forecolor)
end
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.