Editing Module:ColorGive feedback
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 p = {} | local p = {} | ||
-- Hash for color values | -- Hash for color values | ||
local colors_data = { | local colors_data = { | ||
["CitadelCategoryWeapon"] = { | ["CitadelCategoryWeapon"] = { -- weapon | ||
hex = "c97a03", | |||
rgb = "201,122,3", | |||
hsl = "35,97%,40%", | |||
cmyk = "0%,39%,98%,21%" | |||
}, | |||
["CitadelCategoryArmor"] = { | ["CitadelCategoryArmor"] = { --vitality | ||
hex = "659818", | |||
rgb = "101,152,24", | |||
hsl = "82,73%,34%", | |||
cmyk = "34%,0%,84%,40%" | |||
}, | |||
["CitadelCategoryTech"] = { --spirit | ["CitadelCategoryTech"] = { --spirit | ||
hex = "c288f0", -- purple | hex = "c288f0", -- purple | ||
| Line 22: | Line 21: | ||
cmyk = "19%,43%,0%,6%" | cmyk = "19%,43%,0%,6%" | ||
}, | }, | ||
[" | ["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%" | ||
}, | }, | ||
[" | ["Healing"] = { | ||
hex = "00FF9A", | hex = "00FF9A", | ||
rgb = "0,255,154", | rgb = "0,255,154", | ||
| Line 147: | Line 146: | ||
"CitadelCategoryArmor", | "CitadelCategoryArmor", | ||
"CitadelCategoryTech", | "CitadelCategoryTech", | ||
" | "Souls", | ||
" | "Healing", | ||
"hero_atlas", | "hero_atlas", | ||
"hero_wraith", | "hero_wraith", | ||
| Line 209: | Line 208: | ||
key == "Tech") then | key == "Tech") then | ||
key = "CitadelCategory" .. key | key = "CitadelCategory" .. key | ||
end | end | ||
local color_data = colors_data[slot] | local color_data = colors_data[slot] | ||
| Line 253: | Line 247: | ||
-- Add headers | -- Add headers | ||
local headers = {"Key | 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 258: | ||
local row | local row | ||
for i, key in ipairs(colors_order) do | for i, key in ipairs(colors_order) do | ||
local | local hex = colors_data[key]['hex'] | ||
row = '' | row = '' | ||
row = row .. "<td>" .. key .. "</td>" | row = row .. "<td>" .. key .. "</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>" | ||