30 lines
786 B
Lua
30 lines
786 B
Lua
require "ui.globals"
|
|
|
|
local cached_colors = {}
|
|
function cHex(rgb)
|
|
if cached_colors[rgb] then return unpack(cached_colors[rgb]) end
|
|
r = tonumber(string.sub(rgb, 1, 2), 16) / 255
|
|
g = tonumber(string.sub(rgb, 3, 4), 16) / 255
|
|
b = tonumber(string.sub(rgb, 5, 6), 16) / 255
|
|
cached_colors[rgb] = {r, g, b}
|
|
return r, g, b
|
|
end
|
|
|
|
function setBackgroundColor(c)
|
|
love.graphics.setBackgroundColor(cHex(c))
|
|
end
|
|
|
|
function setColor(c)
|
|
love.graphics.setColor(cHex(c))
|
|
end
|
|
|
|
|
|
-- colors.smallNumbersDisabled = cHex("EEEEEE")
|
|
-- colors.smallNumbersEnabled = cHex("0000FF")
|
|
-- colors.boardCursor = cHex("0000FF")
|
|
-- colors.backGround = cHex("FFFFFF")
|
|
-- colors.messagesText = cHex("000000")
|
|
-- colors.boardThinLines = cHex("808080")
|
|
-- colors.boardThikLines = cHex("000000")
|
|
|