Skip to content

Commit

Permalink
Merge pull request #6 from eylles/regular_hex_color
Browse files Browse the repository at this point in the history
use regular hex color string
  • Loading branch information
Zren authored May 31, 2022
2 parents 4dcdfb6 + 85141b1 commit 4745720
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions osc_tethys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,28 @@ local tethys = {
}
read_options(tethys, "tethys")

local function col_format(color)
if string.find(color,"#") then
colorU = string.upper(color)
r = string.sub(colorU,2,3)
g = string.sub(colorU,4,5)
b = string.sub(colorU,6,7)
result = b..g..r
else
result = color
end
return result
end

local function fix_values(values_table)
for k,v in pairs (values_table) do
if string.find(k,"Color") then
values_table[k] = col_format(v)
end
end
end

fix_values(tethys)

tethys.bottomBarHeight = tethys.seekbarHeight + tethys.controlsHeight
tethys.buttonW = tethys.controlsHeight
Expand Down

0 comments on commit 4745720

Please sign in to comment.