blob: f5e39ea8298230ead1f4a8a4486a409550d070e0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
-- ==================================================
-- KoolDots (2026)
-- Project URL: https://github.com/LinuxBeginnings
-- License: GNU GPLv3
-- SPDX-License-Identifier: GPL-3.0-or-later
-- ==================================================
local function load_wallust_colors(path)
local colors = {}
local handle = io.open(path, "r")
if not handle then
return colors
end
for line in handle:lines() do
local name, hex = line:match("^%s*%$([%w_]+)%s*=%s*rgb%(([0-9A-Fa-f]+)%)")
if name and hex and hex ~= "" then
colors[string.lower(name)] = "rgb(" .. string.upper(hex) .. ")"
end
end
handle:close()
return colors
end
return {
load_wallust_colors = load_wallust_colors,
}
|