@@ -8,12 +8,12 @@ local meta = {
8
8
local primitives =
9
9
require (' github-theme.palette.primitives.' .. meta .name :gsub (' ^github%W*' , ' ' , 1 ))
10
10
11
- local pl = primitives .prettylights
11
+ local pl = primitives .color . prettylights
12
12
local scale = primitives .scale
13
13
14
14
C .WHITE = C (scale .white )
15
15
C .BLACK = C (scale .black )
16
- C .BG = C (scale .gray [7 ])
16
+ C .BG = C (scale .neutral [7 ])
17
17
18
18
local function alpha (color , a )
19
19
return color :alpha_blend (a ):to_css ()
@@ -24,40 +24,40 @@ local palette = {
24
24
25
25
orange = scale .orange [4 ],
26
26
27
- black = { base = scale .gray [10 ], bright = scale .gray [9 ] },
28
- gray = { base = scale .gray [5 ], bright = scale .gray [5 ] },
27
+ black = { base = scale .neutral [10 ], bright = scale .neutral [9 ] },
28
+ gray = { base = scale .neutral [5 ], bright = scale .neutral [5 ] },
29
29
blue = { base = scale .blue [4 ], bright = scale .blue [3 ] },
30
30
green = { base = scale .green [4 ], bright = scale .green [3 ] },
31
31
magenta = { base = scale .purple [4 ], bright = scale .purple [3 ] },
32
32
pink = { base = scale .pink [4 ], bright = scale .pink [3 ] },
33
33
red = { base = scale .red [4 ], bright = scale .red [3 ] },
34
- white = { base = scale .gray [3 ], bright = scale .gray [3 ] },
34
+ white = { base = scale .neutral [3 ], bright = scale .neutral [3 ] },
35
35
yellow = { base = scale .yellow [4 ], bright = scale .yellow [3 ] },
36
36
cyan = { base = ' #76e3ea' , bright = ' #b3f0ff' },
37
37
38
38
fg = {
39
39
default = ' #e6edf3' ,
40
40
muted = ' #7d8590' ,
41
- subtle = scale .gray [5 ],
41
+ subtle = scale .neutral [5 ],
42
42
on_emphasis = scale .white ,
43
43
},
44
44
45
45
canvas = {
46
- default = scale .gray [7 ],
47
- overlay = scale .gray [9 ],
48
- inset = scale .gray [8 ],
49
- subtle = scale .gray [9 ],
46
+ default = scale .neutral [7 ],
47
+ overlay = scale .neutral [9 ],
48
+ inset = scale .neutral [8 ],
49
+ subtle = scale .neutral [9 ],
50
50
},
51
51
52
52
border = {
53
- default = scale .gray [9 ],
54
- muted = scale .gray [8 ],
53
+ default = scale .neutral [9 ],
54
+ muted = scale .neutral [8 ],
55
55
subtle = alpha (C .from_rgba (240 , 246 , 252 , 1 ), 0.1 ),
56
56
},
57
57
58
58
neutral = {
59
- emphasis_plus = scale .gray [5 ],
60
- emphasis = scale .gray [5 ],
59
+ emphasis_plus = scale .neutral [5 ],
60
+ emphasis = scale .neutral [5 ],
61
61
muted = alpha (C .from_rgba (110 , 118 , 129 , 1 ), 0.4 ),
62
62
subtle = alpha (C .from_rgba (110 , 118 , 129 , 1 ), 0.1 ),
63
63
},
@@ -129,16 +129,16 @@ local palette = {
129
129
local function generate_spec (pal )
130
130
-- stylua: ignore start
131
131
local spec = {
132
- bg0 = alpha (C (pal . canvas .inset ), 0.75 ), -- Dark bg (popup and float)
133
- bg1 = pal . canvas .default , -- Default bg
132
+ bg0 = alpha (C (primitives . bgColor .inset ), 0.75 ), -- Dark bg (popup and float)
133
+ bg1 = primitives . bgColor .default , -- Default bg
134
134
bg2 = alpha (C (pal .neutral .emphasis ), 0.1 ), -- Lighter bg (colorcolumn Folds)
135
- bg3 = pal .scale .gray [6 ], -- Lighter bg (cursor line)
136
- bg4 = pal .scale .gray [4 ], -- Conceal
135
+ bg3 = pal .scale .neutral [6 ], -- Lighter bg (cursor line)
136
+ bg4 = pal .scale .neutral [4 ], -- Conceal
137
137
138
138
fg0 = pal .fg .subtle , -- Lighter fg
139
- fg1 = pal . fg .default , -- Default fg
139
+ fg1 = primitives . fgColor .default , -- Default fg
140
140
fg2 = pal .fg .muted , -- Darker fg (status line)
141
- fg3 = pal .scale .gray [5 ], -- Darker fg (line numbers, fold columns)
141
+ fg3 = pal .scale .neutral [5 ], -- Darker fg (line numbers, fold columns)
142
142
143
143
sel0 = alpha (C (pal .accent .fg ), 0.30 ), -- Visual selection bg
144
144
sel1 = alpha (C (pal .accent .muted ), 0.90 ), -- Popup sel bg
@@ -147,26 +147,26 @@ local function generate_spec(pal)
147
147
148
148
spec .syntax = {
149
149
bracket = spec .fg1 , -- Brackets and Punctuation
150
- builtin0 = pl .syntax .constant , -- Builtin variable
150
+ builtin0 = pl .syntax .constant . default , -- Builtin variable
151
151
builtin1 = pl .syntax .keyword , -- Builtin type
152
- builtin2 = pl .syntax .constant , -- Builtin const
152
+ builtin2 = pl .syntax .constant . default , -- Builtin const
153
153
comment = pl .syntax .comment , -- Comment
154
154
conditional = pl .syntax .keyword , -- Conditional and loop
155
- const = pl .syntax .constant , -- Constants, imports and booleans
155
+ const = pl .syntax .constant . default , -- Constants, imports and booleans
156
156
dep = pal .scale .red [3 ], -- Deprecated
157
- field = pl .syntax .constant , -- Field
158
- func = pl .syntax .entity , -- Functions and Titles
157
+ field = pl .syntax .constant . default , -- Field
158
+ func = pl .syntax .entity . default , -- Functions and Titles
159
159
ident = spec .fg1 , -- Identifiers
160
160
keyword = pl .syntax .keyword , -- Keywords
161
- number = pl .syntax .constant , -- Numbers
162
- operator = pl .syntax .constant , -- Operators
161
+ number = pl .syntax .constant . default , -- Numbers
162
+ operator = pl .syntax .constant . default , -- Operators
163
163
param = spec .fg1 , -- Parameters
164
164
preproc = pl .syntax .keyword , -- PreProc
165
- regex = pl .syntax .string , -- Regex
165
+ regex = pl .syntax .string . default , -- Regex
166
166
statement = pl .syntax .keyword , -- Statements
167
- string = pl .syntax .string , -- Strings
167
+ string = pl .syntax .string . default , -- Strings
168
168
type = pl .syntax .variable , -- Types
169
- tag = pl .syntax .entityTag , -- Tags
169
+ tag = pl .syntax .entity . tag , -- Tags
170
170
variable = spec .fg1 , -- Variables
171
171
}
172
172
0 commit comments