Editing Module:Color

Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
local lang_module = require('Module:Lang')
local p = {}
local p = {}


Line 22: Line 21:
cmyk = "19%,43%,0%,6%"
cmyk = "19%,43%,0%,6%"
},
},
["Citadel_LaneStats_Souls"] = {
["Souls"] = {
         hex = "98ffde",
         hex = "98ffde",
         rgb = "152,255,222",
         rgb = "152,255,222",
Line 28: Line 27:
         cmyk = "40%,0%,13%,0%"
         cmyk = "40%,0%,13%,0%"
     },
     },
     ["Citadel_Profile_Stats_Healing"] = {
     ["Healing"] = {
         hex = "00FF9A",
         hex = "00FF9A",
         rgb = "0,255,154",
         rgb = "0,255,154",
Line 147: Line 146:
"CitadelCategoryArmor",
"CitadelCategoryArmor",
"CitadelCategoryTech",
"CitadelCategoryTech",
"Citadel_LaneStats_Souls",
"Souls",
"Citadel_Profile_Stats_Healing",
"Healing",
"hero_atlas",
"hero_atlas",
"hero_wraith",
"hero_wraith",
Line 253: Line 252:
-- Add headers
-- Add headers
local headers = {"Key", "English", "Hex Code", "Colored div", "Colored Text", "Colored Underline"}
local headers = {"Key", "Hex Code", "Colored div", "Colored Text", "Colored Underline"}
local header_row = ""
local header_row = ""
for _, header in ipairs(headers) do
for _, header in ipairs(headers) do
Line 264: Line 263:
local row
local row
for i, key in ipairs(colors_order) do
for i, key in ipairs(colors_order) do
local color_data = colors_data[key]
local hex = colors_data[key]['hex']
if color_data == nil then return "key " .. key .. " from colors_order is missing in colors_data" end
local hex = color_data['hex']
local english = lang_module.get_string(key, 'en')
row = ''
row = ''
row = row .. "<td>" .. key .. "</td>"
row = row .. "<td>" .. key .. "</td>"
row = row .. "<td>" .. english .. "</td>"
row = row .. "<td>" .. "#" .. hex .. "</td>"
row = row .. "<td>" .. "#" .. hex .. "</td>"
row = row .. "<td>" .. "<div style=background-color:#" .. hex .. ";>" .. key .. "</div>" .. "</td>"
row = row .. "<td>" .. "<div style=background-color:#" .. hex .. ";>" .. key .. "</div>" .. "</td>"
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Deadlock:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template