Module:Text color

De Pikmin FR
Version datée du 20 septembre 2024 à 12:05 par fr>Fxfxfx0 (Fxfxfx0 a déplacé la page Module:TextColor vers Module:Text color sans laisser de redirection)

La documentation pour ce module peut être créée à Module:Text color/doc

local p = {}

function p.main(frame)
    local arg = frame:getParent().args[1] or ""
    return p.getColor(arg)
end

function p.getColor(arg)
    local colorTable = {
        ["Red"] = "245, 48, 70",  -- #f53046 Used in the logo
        ["Brown"] = "127, 57, 0",  -- #7f3900 Used in the waiting mini-game names
        ["Orange"] = "240, 119, 0",  -- #f07700 Used for emphasis
        ["Gold"] = "255, 187, 0",  -- #ffbb00 Used for timer text when low and for emphasis in the tutorial
        ["Yellow"] = "238, 255, 0",  -- #eeff00 Used for the "level up" text and other places for emphasis
        ["Lime"] = "190, 225, 0",  -- #bee100 Used for the "level" title and in the Octo Valley HUD
        ["Violet"] = "204, 6, 255",  -- #cc06ff Used for character names in Booyah Base
        ["Callie"] = "197, 2, 227",  -- #c502e3
        ["Marie"] = "53, 133, 0",  -- #358500
        ["Cap'n Cuttlefish"] = "42, 131, 121",  -- #2a8379
        ["DJ Octavio"] = "224, 0, 127",  -- #e0007f
        ["Orange S2"] = "255, 120, 0",  -- #ff7800 Used for emphasis
        ["Yellow S2"] = "220, 217, 0",  -- #dcd900 Used for emphasis in the tutorial and for titles in the results screen
        ["Green S2"] = "89, 234, 0",  -- #59ea00 Used for the "Level" title in the results screen
        ["Gray S2"] = "165, 165, 180",  -- #a5a5b4 Used for inner monologue e.g. when bugging Marie many times in Octo Canyon
        ["Pearl"] = "224, 0, 131",  -- #e00083
        ["Marina"] = "6, 132, 79",  -- #06844f
        ["Sheldon"] = "238, 254, 0",  -- #eefe00
        ["Flow"] = "255, 100, 110",  -- #ff646e
        ["Craymond"] = "252, 200, 172",  -- #fcc8ac
        ["Jelfonzo"] = "0, 255, 188",  -- #00ffbc
        ["Bisk"] = "255, 172, 0",  -- #ffac00
        ["Crusty Sean"] = "255, 249, 0",  -- #fff000
        ["Murch"] = "181, 0, 255",  -- #b500ff
        ["Marie S2"] = "3, 135, 69",  -- #038745
        ["Sheldon Octo Canyon"] = "66, 128, 0",  -- #428000
        ["Callie S2"] = "205, 0, 219",  -- #cd00db
        ["DJ Octavio S2"] = "224, 0, 127",  -- #e0007f
        ["Mr. Grizz"] = "189, 91, 0",  -- #bd5b00
        ["Salmon Run Orange"] = "245, 101, 40",  -- #f56528 Used in "Freelance" menu item and supplied weapon text
        ["Salmon Run Yellow"] = "240, 255, 0",  -- #f0ff00 Used in "With Friends" menu item and rare weapon text
        ["Salmon Run Green"] = "90, 242, 125",  -- #5af27d Used in "Online Lounge" menu item and wave start text
        ["Shiver"] = "20, 55, 255",  -- #1437FF
        ["Frye"] = "246, 255, 0",  -- #F6FF00
        ["Big Man"] = "156, 156, 156",  -- #9C9C9C
        ["Sheldon S3"] = "224, 244, 0",  -- #e0f400
        ["Gnarly Eddy"] = "248, 99, 67",  -- #f86343
        ["Nails"] = "251, 116, 101",  -- #fb7465
        ["Jel La Fleur"] = "87, 233, 206",  -- #57e9ce
        ["Mr. Coco"] = "242, 122, 54",  -- #f27a36
        ["Harmony"] = "245, 173, 192",  -- #f5adc0
        ["Murch S3"] = "241, 124, 0",  -- #f17c00
        ["Shelly"] = "236, 235, 135",  -- #eceb87
        ["Donny"] = "240, 238, 131",  -- #f0ee83
        ["Annie S3"] = "235, 92, 141",  -- #eb5c8d
        ["Moe S3"] = "241, 186, 66",  -- #f1ba42
        ["Jelonzo S3"] = "87, 233, 206",  -- #57e9ce
        ["Fred Crumbs"] = "219, 149, 43",  -- #db952b
        ["Spyke S3"] = "232, 52, 243",  -- #e834f3
        ["Crab-N-Go Staff"] = "226, 245, 67",  -- #e2f543
        ["Tableturf Battle Staff"] = "100, 90, 242",  -- #645af2
        ["Recon Guide"] = "250, 248, 113",  -- #faf871
        ["Cap'n Cuttlefish RotM"] = "241, 176, 76",  -- #F1B04C
        ["DJ Octavio RotM"] = "161, 5, 153",  -- #A10599
        ["Callie RotM"] = "160, 0, 200",  -- #A000C8
        ["Marie RotM"] = "127, 211, 156",  -- #7FD39C
        ["O.R.C.A."] = "0, 252, 0",  -- #00fc00
        ["Shiver RotM"] = "27, 124, 237",  -- #1B7CED
        ["Frye RotM"] = "229, 222, 0",  -- #E5DE00
        ["Big Man RotM"] = "255, 165, 144",  -- #FFA590
        ["Mr. Grizz RotM"] = "138, 43, 226",  -- #8A2BE2
    }
    
    return colorTable[arg] or "192, 192, 192"  -- #C0C0C0 Default case
end

return p