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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
local colors = require "prismite.palette"
local utils = require "prismite.utils"
local styles = {
normal = {
a = { bg = colors.blue, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg_high, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
insert = {
a = { bg = colors.green, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg_high, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
visual = {
a = { bg = colors.pink, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg_high, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
replace = {
a = { bg = colors.red, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg_high, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
command = {
a = { bg = colors.cyan, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg_high, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
inactive = {
a = { bg = colors.bg, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
}
for _, segments in pairs(styles) do
for _, segment in pairs(segments) do
if type(segment.fg) == "table" and utils.is_oklch(segment.fg) then
segment.fg = utils.oklch2hex(segment.fg)
end
if type(segment.bg) == "table" and utils.is_oklch(segment.bg) then
segment.bg = utils.oklch2hex(segment.bg)
end
if type(segment.sp) == "table" and utils.is_oklch(segment.sp) then
segment.sp = utils.oklch2hex(segment.sp)
end
end
end
return styles
|