Editing Module:ColorGive feedback
Jump to navigation
Jump to search
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 142: | Line 141: | ||
cmyk = "0%,63%,18%,35%" | cmyk = "0%,63%,18%,35%" | ||
} | } | ||
} | } | ||
| Line 209: | Line 183: | ||
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 222: | ||
-- 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 263: | Line 232: | ||
local rows = "" | local rows = "" | ||
local row | local row | ||
for | for key, value in pairs(colors_data) do | ||
local hex = value['hex'] | |||
local 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>" | ||