4. Defining themes
If you haven't read the previous topic, please read it >>> Language file layout <<<
Themes
Now create the file ehud/config/themes.lua with content:
local skin = {}
skin.name = "Blackout" --name for skin
skin.colors = {}
skin.colors.main = {
bg = Color(39, 42, 49,220),
accent = Color(252, 56, 79),
}
skin.colors.doors = {
bg = Color(13,13,13,200),
}
ehud.addon:RegisterSkin("blackout", skin)
--RegisterSkin(<uid>,<skin table>)
ehud.addon:SetDefaultSkin("blackout")--will be default
Usage
colors = ehud.addon:GetColors()
print(colors.main.bg) --Color(39, 42, 49,220)
print(colors.main.accent) --Color(252, 56, 79)
print(colors.doors.bg) --Color(13,13,13,200)