This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.Get HTML colors for Angry Birds 2 ranks (cards and slingshots).
Get HTML color by key
{{#invoke:AB2 rank colors|getHTMLColor|<key>}}
where <key> is one of (must be in lowercase):
- vanilla_card
- vanilla_slingshot
- bronze
- silver
- gold
- azure
- emerald
- amethyst
- diamond
- legendary
Example
{{#invoke:AB2 rank colors|getHTMLColor|vanilla_slingshot}}
gives: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.
Get HTML color by card rank
{{#invoke:AB2 rank colors|getHTMLColorByCardRank|<rank>}}
<rank>: a positive integer.
Examples
{{#invoke:AB2 rank colors|getHTMLColorByCardRank|1}}gives: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.{{#invoke:AB2 rank colors|getHTMLColorByCardRank|10}}gives: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.{{#invoke:AB2 rank colors|getHTMLColorByCardRank|25}}gives: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.{{#invoke:AB2 rank colors|getHTMLColorByCardRank|51}}gives: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.{{#invoke:AB2 rank colors|getHTMLColorByCardRank|100}}gives: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.
Get HTML color by slingshot rank
{{#invoke:AB2 rank colors|getHTMLColorBySlingshotRank|<rank>}}
<rank>: a positive integer.
Examples
{{#invoke:AB2 rank colors|getHTMLColorBySlingshotRank|1}}gives: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.{{#invoke:AB2 rank colors|getHTMLColorBySlingshotRank|10}}gives: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.{{#invoke:AB2 rank colors|getHTMLColorBySlingshotRank|25}}gives: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.{{#invoke:AB2 rank colors|getHTMLColorBySlingshotRank|51}}gives: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.{{#invoke:AB2 rank colors|getHTMLColorBySlingshotRank|100}}gives: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.
See also
- Angry Birds 2 modules
local getArgs = require('Module:Common').getArgs
-- HTML colors: https://www.w3.org/TR/css-color-3/#svg-color
local HTMLColors = {
['vanilla'] = 'powderblue',
['bronze'] = 'darkgoldenrod',
['silver'] = 'silver',
['gold'] = 'gold',
['azure'] = 'slateblue',
['emerald'] = 'mediumseagreen',
['amethyst'] = 'plum',
['diamond'] = 'aquamarine',
['legendary'] = 'darkorange',
}
local p = {}
p.getHTMLColor = function(frame)
local args = getArgs(frame)
local key = string.lower(args[1])
return HTMLColors[key]
end
return p
