×
Create a new article
Write your page title here:
We currently have 770 articles on Angry Birds Wiki. Type your article name above or create one of the articles listed here!



    Angry Birds Wiki
    770Articles

    Module:AB2 rank colors

    Revision as of 20:12, 22 August 2021 by fandom:angrybirds>Ytxmobile (legendary rank)
    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
    
    local colors = {
    	['vanilla'] = 'powderblue',
    	['bronze'] = 'darkgoldenrod',
    	['silver'] = 'silver',
    	['gold'] = 'gold',
    	['azure'] = 'slateblue',
    	['emerald'] = 'mediumseagreen',
    	['amethyst'] = 'plum',
    	['diamond'] = 'aquamarine',
    	['legendary'] = 'darkorange',
    }
    
    local p = {}
    
    p.getColor = function(frame)
    	local args = getArgs(frame)
    	local key = string.lower(args[1])
    	return colors[key]
    end
    
    return p
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.