@@ -5,6 +5,11 @@ local meta = {
5
5
light = true ,
6
6
}
7
7
8
+ local primitives =
9
+ require (' github-theme.palette.primitives.' .. meta .name :gsub (' ^github%W*' , ' ' , 1 ))
10
+
11
+ local pl = primitives .prettylights
12
+
8
13
--- Github Light High Contrast scale variables
9
14
--- source: https://github.com/primer/primitives/blob/main/data/colors/themes/light_high_contrast.ts
10
15
-- stylua: ignore
@@ -168,20 +173,20 @@ local palette = {
168
173
local function generate_spec (pal )
169
174
-- stylua: ignore start
170
175
local spec = {
171
- bg0 = pal .canvas .inset , -- Dark bg (popup and float)
172
- bg1 = pal .canvas .default , -- Default bg
173
- bg2 = alpha (C (pal .neutral .emphasis ), 0.1 ), -- Lighter bg (colorcolumn Folds)
174
- bg3 = pal .scale .gray [2 ], -- Lighter bg (cursor line)
175
- bg4 = pal .border .default , -- Conceal
176
-
177
- fg0 = pal .fg .subtle , -- Lighter fg
178
- fg1 = pal .fg .default , -- Default fg
176
+ bg0 = pal .canvas .inset , -- Dark bg (popup and float)
177
+ bg1 = pal .canvas .default , -- Default bg
178
+ bg2 = alpha (C (pal .neutral .emphasis ), 0.1 ), -- Lighter bg (colorcolumn Folds)
179
+ bg3 = pal .scale .gray [2 ], -- Lighter bg (cursor line)
180
+ bg4 = pal .border .default , -- Conceal
181
+
182
+ fg0 = pal .fg .subtle , -- Lighter fg
183
+ fg1 = pal .fg .default , -- Default fg
179
184
fg2 = pal .scale .gray [9 ], -- Darker fg (status line)
180
- fg3 = pal .scale .gray [7 ], -- Darker fg (line numbers, fold columns)
185
+ fg3 = pal .scale .gray [7 ], -- Darker fg (line numbers, fold columns)
181
186
182
- sel0 = alpha (C (pal .accent .fg ), 0.2 ), -- Visual selection bg
183
- sel1 = alpha (C (pal .accent .muted ), 0.90 ), -- Popup sel bg
184
- sel2 = alpha (C (pal .attention .emphasis ), 0.3 ) -- Search bg
187
+ sel0 = alpha (C (pal .accent .fg ), 0.2 ), -- Visual selection bg
188
+ sel1 = alpha (C (pal .accent .muted ), 0.90 ), -- Popup sel bg
189
+ sel2 = alpha (C (pal .attention .emphasis ), 0.3 ) -- Search bg
185
190
}
186
191
187
192
spec .syntax = {
@@ -193,18 +198,18 @@ local function generate_spec(pal)
193
198
conditional = pal .scale .red [6 ], -- Conditional and loop
194
199
const = pal .scale .blue [6 ], -- Constants, imports and booleans
195
200
dep = pal .scale .red [8 ], -- Deprecated
196
- field = spec . fg1 , -- Field
201
+ field = pl . syntax . constant , -- Field
197
202
func = pal .scale .purple [6 ], -- Functions and Titles
198
203
ident = pal .scale .blue [9 ], -- Identifiers
199
204
keyword = pal .scale .red [6 ], -- Keywords
200
205
number = pal .scale .blue [7 ], -- Numbers
201
- operator = pal . scale . red [ 6 ], -- Operators
202
- param = pal . scale . orange [ 5 ] , -- PreProc
206
+ operator = pl . syntax . constant , -- Operators
207
+ param = spec . fg1 , -- Parameters
203
208
preproc = pal .scale .red [6 ], -- PreProc
204
209
regex = pal .scale .blue [9 ], -- Regex
205
210
statement = pal .scale .red [6 ], -- Statements
206
211
string = pal .scale .blue [8 ], -- Strings
207
- type = pal . scale . red [ 6 ], -- Types
212
+ type = pl . syntax . variable , -- Types
208
213
tag = pal .scale .green [6 ], -- Tags
209
214
variable = spec .fg1 , -- Variables
210
215
}
@@ -242,4 +247,9 @@ local function generate_spec(pal)
242
247
return spec
243
248
end
244
249
245
- return { meta = meta , palette = palette , generate_spec = generate_spec }
250
+ return {
251
+ meta = meta ,
252
+ primitives = primitives ,
253
+ palette = palette ,
254
+ generate_spec = generate_spec ,
255
+ }
0 commit comments