24,983
edits
(first draft) |
No edit summary |
||
Line 4: | Line 4: | ||
function tierColouriser.getColour(frame) | function tierColouriser.getColour(frame) | ||
colourCount = | colourCount = tonumber(frame.args[1]) | ||
thisTier = | thisTier = tonumber(frame.args[2]) | ||
style = frame.args[3] | style = frame.args[3] | ||
targetColour = tierColours[colourCount][thisTier] | targetColour = tierColours[colourCount][thisTier] | ||
Line 17: | Line 17: | ||
lighten = 0.5 | lighten = 0.5 | ||
end | end | ||
targetColour[ | returnColour = {127, 127, 127} -- targetColour inherits the readonly-ness of the import | ||
returnColour[1] = math.floor(targetColour[1] * (1 - lighten) + 255 * lighten) | |||
returnColour[2] = math.floor(targetColour[2] * (1 - lighten) + 255 * lighten) | |||
return | returnColour[3] = math.floor(targetColour[3] * (1 - lighten) + 255 * lighten) | ||
return "rgb("..returnColour[1]..","..returnColour[2]..","..returnColour[3]..")" | |||
end | end | ||
return tierColouriser | return tierColouriser |