@nyxwire/palette 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,334 @@
1
+ @layer theme {
2
+ :root, [data-flavor="nocturne"] {
3
+ color-scheme: dark;
4
+ --nw-crust: #0a0329;
5
+ --nw-crust-rgb: 10 3 41;
6
+ --nw-mantle: #0e0533;
7
+ --nw-mantle-rgb: 14 5 51;
8
+ --nw-base: #14093e;
9
+ --nw-base-rgb: 20 9 62;
10
+ --nw-surface0: #1d154c;
11
+ --nw-surface0-rgb: 29 21 76;
12
+ --nw-surface1: #272258;
13
+ --nw-surface1-rgb: 39 34 88;
14
+ --nw-surface2: #302d60;
15
+ --nw-surface2-rgb: 48 45 96;
16
+ --nw-overlay0: #464673;
17
+ --nw-overlay0-rgb: 70 70 115;
18
+ --nw-overlay1: #6c6d93;
19
+ --nw-overlay1-rgb: 108 109 147;
20
+ --nw-overlay2: #8b8cab;
21
+ --nw-overlay2-rgb: 139 140 171;
22
+ --nw-subtext0: #b2b4ca;
23
+ --nw-subtext0-rgb: 178 180 202;
24
+ --nw-subtext1: #d4d4e3;
25
+ --nw-subtext1-rgb: 212 212 227;
26
+ --nw-text: #f2f3fa;
27
+ --nw-text-rgb: 242 243 250;
28
+ --nw-indigo: #848fff;
29
+ --nw-indigo-rgb: 132 143 255;
30
+ --nw-iris: #cdc0ff;
31
+ --nw-iris-rgb: 205 192 255;
32
+ --nw-flux: #d071ff;
33
+ --nw-flux-rgb: 208 113 255;
34
+ --nw-synth: #ff47d8;
35
+ --nw-synth-rgb: 255 71 216;
36
+ --nw-alarm: #ff5d7b;
37
+ --nw-alarm-rgb: 255 93 123;
38
+ --nw-flare: #ff9845;
39
+ --nw-flare-rgb: 255 152 69;
40
+ --nw-volt: #f8e445;
41
+ --nw-volt-rgb: 248 228 69;
42
+ --nw-matrix: #4bf677;
43
+ --nw-matrix-rgb: 75 246 119;
44
+ --nw-circuit: #17edd5;
45
+ --nw-circuit-rgb: 23 237 213;
46
+ --nw-ice: #5eddfe;
47
+ --nw-ice-rgb: 94 221 254;
48
+ --nw-arc: #4aa9ff;
49
+ --nw-arc-rgb: 74 169 255;
50
+ --nw-steel: #b5bdd5;
51
+ --nw-steel-rgb: 181 189 213;
52
+ --nw-flavor-dark: 1;
53
+ --nw-on-accent: var(--nw-crust);
54
+ --nw-accent: var(--nw-indigo);
55
+ }
56
+ [data-flavor="abyss"] {
57
+ color-scheme: dark;
58
+ --nw-crust: #030312;
59
+ --nw-crust-rgb: 3 3 18;
60
+ --nw-mantle: #050419;
61
+ --nw-mantle-rgb: 5 4 25;
62
+ --nw-base: #080720;
63
+ --nw-base-rgb: 8 7 32;
64
+ --nw-surface0: #12122f;
65
+ --nw-surface0-rgb: 18 18 47;
66
+ --nw-surface1: #1b1c3b;
67
+ --nw-surface1-rgb: 27 28 59;
68
+ --nw-surface2: #262747;
69
+ --nw-surface2-rgb: 38 39 71;
70
+ --nw-overlay0: #3e415f;
71
+ --nw-overlay0-rgb: 62 65 95;
72
+ --nw-overlay1: #646781;
73
+ --nw-overlay1-rgb: 100 103 129;
74
+ --nw-overlay2: #82849b;
75
+ --nw-overlay2-rgb: 130 132 155;
76
+ --nw-subtext0: #aeb0c1;
77
+ --nw-subtext0-rgb: 174 176 193;
78
+ --nw-subtext1: #d0d2dd;
79
+ --nw-subtext1-rgb: 208 210 221;
80
+ --nw-text: #f0f1f7;
81
+ --nw-text-rgb: 240 241 247;
82
+ --nw-indigo: #848fff;
83
+ --nw-indigo-rgb: 132 143 255;
84
+ --nw-iris: #cdc0ff;
85
+ --nw-iris-rgb: 205 192 255;
86
+ --nw-flux: #d071ff;
87
+ --nw-flux-rgb: 208 113 255;
88
+ --nw-synth: #ff47d8;
89
+ --nw-synth-rgb: 255 71 216;
90
+ --nw-alarm: #ff5d7b;
91
+ --nw-alarm-rgb: 255 93 123;
92
+ --nw-flare: #ff9845;
93
+ --nw-flare-rgb: 255 152 69;
94
+ --nw-volt: #f8e445;
95
+ --nw-volt-rgb: 248 228 69;
96
+ --nw-matrix: #4bf677;
97
+ --nw-matrix-rgb: 75 246 119;
98
+ --nw-circuit: #17edd5;
99
+ --nw-circuit-rgb: 23 237 213;
100
+ --nw-ice: #5eddfe;
101
+ --nw-ice-rgb: 94 221 254;
102
+ --nw-arc: #4aa9ff;
103
+ --nw-arc-rgb: 74 169 255;
104
+ --nw-steel: #b5bdd5;
105
+ --nw-steel-rgb: 181 189 213;
106
+ --nw-flavor-dark: 1;
107
+ --nw-on-accent: var(--nw-crust);
108
+ --nw-accent: var(--nw-indigo);
109
+ }
110
+ [data-flavor="twilight"] {
111
+ color-scheme: dark;
112
+ --nw-crust: #1b1136;
113
+ --nw-crust-rgb: 27 17 54;
114
+ --nw-mantle: #211540;
115
+ --nw-mantle-rgb: 33 21 64;
116
+ --nw-base: #271a4b;
117
+ --nw-base-rgb: 39 26 75;
118
+ --nw-surface0: #312457;
119
+ --nw-surface0-rgb: 49 36 87;
120
+ --nw-surface1: #3b2f61;
121
+ --nw-surface1-rgb: 59 47 97;
122
+ --nw-surface2: #453b6a;
123
+ --nw-surface2-rgb: 69 59 106;
124
+ --nw-overlay0: #59517a;
125
+ --nw-overlay0-rgb: 89 81 122;
126
+ --nw-overlay1: #7c7799;
127
+ --nw-overlay1-rgb: 124 119 153;
128
+ --nw-overlay2: #9793af;
129
+ --nw-overlay2-rgb: 151 147 175;
130
+ --nw-subtext0: #bab7cd;
131
+ --nw-subtext0-rgb: 186 183 205;
132
+ --nw-subtext1: #d9d7e4;
133
+ --nw-subtext1-rgb: 217 215 228;
134
+ --nw-text: #f5f4fa;
135
+ --nw-text-rgb: 245 244 250;
136
+ --nw-indigo: #848fff;
137
+ --nw-indigo-rgb: 132 143 255;
138
+ --nw-iris: #cdc0ff;
139
+ --nw-iris-rgb: 205 192 255;
140
+ --nw-flux: #d071ff;
141
+ --nw-flux-rgb: 208 113 255;
142
+ --nw-synth: #ff47d8;
143
+ --nw-synth-rgb: 255 71 216;
144
+ --nw-alarm: #ff5d7b;
145
+ --nw-alarm-rgb: 255 93 123;
146
+ --nw-flare: #ff9845;
147
+ --nw-flare-rgb: 255 152 69;
148
+ --nw-volt: #f8e445;
149
+ --nw-volt-rgb: 248 228 69;
150
+ --nw-matrix: #4bf677;
151
+ --nw-matrix-rgb: 75 246 119;
152
+ --nw-circuit: #17edd5;
153
+ --nw-circuit-rgb: 23 237 213;
154
+ --nw-ice: #5eddfe;
155
+ --nw-ice-rgb: 94 221 254;
156
+ --nw-arc: #4aa9ff;
157
+ --nw-arc-rgb: 74 169 255;
158
+ --nw-steel: #b5bdd5;
159
+ --nw-steel-rgb: 181 189 213;
160
+ --nw-flavor-dark: 1;
161
+ --nw-on-accent: var(--nw-crust);
162
+ --nw-accent: var(--nw-indigo);
163
+ }
164
+ [data-flavor="lumen"] {
165
+ color-scheme: light;
166
+ --nw-crust: #d3cefa;
167
+ --nw-crust-rgb: 211 206 250;
168
+ --nw-mantle: #dedaff;
169
+ --nw-mantle-rgb: 222 218 255;
170
+ --nw-base: #eae6ff;
171
+ --nw-base-rgb: 234 230 255;
172
+ --nw-surface0: #ddd9ff;
173
+ --nw-surface0-rgb: 221 217 255;
174
+ --nw-surface1: #d1cdf8;
175
+ --nw-surface1-rgb: 209 205 248;
176
+ --nw-surface2: #c6c1ef;
177
+ --nw-surface2-rgb: 198 193 239;
178
+ --nw-overlay0: #b0abd9;
179
+ --nw-overlay0-rgb: 176 171 217;
180
+ --nw-overlay1: #7c76a4;
181
+ --nw-overlay1-rgb: 124 118 164;
182
+ --nw-overlay2: #686191;
183
+ --nw-overlay2-rgb: 104 97 145;
184
+ --nw-subtext0: #524a7e;
185
+ --nw-subtext0-rgb: 82 74 126;
186
+ --nw-subtext1: #3d326b;
187
+ --nw-subtext1-rgb: 61 50 107;
188
+ --nw-text: #1f0e47;
189
+ --nw-text-rgb: 31 14 71;
190
+ --nw-indigo: #4940d7;
191
+ --nw-indigo-rgb: 73 64 215;
192
+ --nw-iris: #6746a7;
193
+ --nw-iris-rgb: 103 70 167;
194
+ --nw-flux: #8c16c5;
195
+ --nw-flux-rgb: 140 22 197;
196
+ --nw-synth: #a8008b;
197
+ --nw-synth-rgb: 168 0 139;
198
+ --nw-alarm: #b6002c;
199
+ --nw-alarm-rgb: 182 0 44;
200
+ --nw-flare: #9d3a00;
201
+ --nw-flare-rgb: 157 58 0;
202
+ --nw-volt: #6e5700;
203
+ --nw-volt-rgb: 110 87 0;
204
+ --nw-matrix: #00680f;
205
+ --nw-matrix-rgb: 0 104 15;
206
+ --nw-circuit: #006558;
207
+ --nw-circuit-rgb: 0 101 88;
208
+ --nw-ice: #006081;
209
+ --nw-ice-rgb: 0 96 129;
210
+ --nw-arc: #0055b6;
211
+ --nw-arc-rgb: 0 85 182;
212
+ --nw-steel: #4d5976;
213
+ --nw-steel-rgb: 77 89 118;
214
+ --nw-flavor-dark: 0;
215
+ --nw-on-accent: var(--nw-base);
216
+ --nw-accent: var(--nw-indigo);
217
+ }
218
+ @media (prefers-color-scheme: light) {
219
+ :root:where(:not([data-flavor])) {
220
+ color-scheme: light;
221
+ --nw-crust: #d3cefa;
222
+ --nw-crust-rgb: 211 206 250;
223
+ --nw-mantle: #dedaff;
224
+ --nw-mantle-rgb: 222 218 255;
225
+ --nw-base: #eae6ff;
226
+ --nw-base-rgb: 234 230 255;
227
+ --nw-surface0: #ddd9ff;
228
+ --nw-surface0-rgb: 221 217 255;
229
+ --nw-surface1: #d1cdf8;
230
+ --nw-surface1-rgb: 209 205 248;
231
+ --nw-surface2: #c6c1ef;
232
+ --nw-surface2-rgb: 198 193 239;
233
+ --nw-overlay0: #b0abd9;
234
+ --nw-overlay0-rgb: 176 171 217;
235
+ --nw-overlay1: #7c76a4;
236
+ --nw-overlay1-rgb: 124 118 164;
237
+ --nw-overlay2: #686191;
238
+ --nw-overlay2-rgb: 104 97 145;
239
+ --nw-subtext0: #524a7e;
240
+ --nw-subtext0-rgb: 82 74 126;
241
+ --nw-subtext1: #3d326b;
242
+ --nw-subtext1-rgb: 61 50 107;
243
+ --nw-text: #1f0e47;
244
+ --nw-text-rgb: 31 14 71;
245
+ --nw-indigo: #4940d7;
246
+ --nw-indigo-rgb: 73 64 215;
247
+ --nw-iris: #6746a7;
248
+ --nw-iris-rgb: 103 70 167;
249
+ --nw-flux: #8c16c5;
250
+ --nw-flux-rgb: 140 22 197;
251
+ --nw-synth: #a8008b;
252
+ --nw-synth-rgb: 168 0 139;
253
+ --nw-alarm: #b6002c;
254
+ --nw-alarm-rgb: 182 0 44;
255
+ --nw-flare: #9d3a00;
256
+ --nw-flare-rgb: 157 58 0;
257
+ --nw-volt: #6e5700;
258
+ --nw-volt-rgb: 110 87 0;
259
+ --nw-matrix: #00680f;
260
+ --nw-matrix-rgb: 0 104 15;
261
+ --nw-circuit: #006558;
262
+ --nw-circuit-rgb: 0 101 88;
263
+ --nw-ice: #006081;
264
+ --nw-ice-rgb: 0 96 129;
265
+ --nw-arc: #0055b6;
266
+ --nw-arc-rgb: 0 85 182;
267
+ --nw-steel: #4d5976;
268
+ --nw-steel-rgb: 77 89 118;
269
+ --nw-flavor-dark: 0;
270
+ --nw-on-accent: var(--nw-base);
271
+ --nw-accent: var(--nw-indigo);
272
+ }
273
+ }
274
+ [data-accent="indigo"],
275
+ [data-accent="indigo"] [data-flavor]:not([data-accent]),
276
+ [data-accent] [data-accent="indigo"] [data-flavor]:not([data-accent]) {
277
+ --nw-accent: var(--nw-indigo);
278
+ }
279
+ [data-accent="iris"],
280
+ [data-accent="iris"] [data-flavor]:not([data-accent]),
281
+ [data-accent] [data-accent="iris"] [data-flavor]:not([data-accent]) {
282
+ --nw-accent: var(--nw-iris);
283
+ }
284
+ [data-accent="flux"],
285
+ [data-accent="flux"] [data-flavor]:not([data-accent]),
286
+ [data-accent] [data-accent="flux"] [data-flavor]:not([data-accent]) {
287
+ --nw-accent: var(--nw-flux);
288
+ }
289
+ [data-accent="synth"],
290
+ [data-accent="synth"] [data-flavor]:not([data-accent]),
291
+ [data-accent] [data-accent="synth"] [data-flavor]:not([data-accent]) {
292
+ --nw-accent: var(--nw-synth);
293
+ }
294
+ [data-accent="alarm"],
295
+ [data-accent="alarm"] [data-flavor]:not([data-accent]),
296
+ [data-accent] [data-accent="alarm"] [data-flavor]:not([data-accent]) {
297
+ --nw-accent: var(--nw-alarm);
298
+ }
299
+ [data-accent="flare"],
300
+ [data-accent="flare"] [data-flavor]:not([data-accent]),
301
+ [data-accent] [data-accent="flare"] [data-flavor]:not([data-accent]) {
302
+ --nw-accent: var(--nw-flare);
303
+ }
304
+ [data-accent="volt"],
305
+ [data-accent="volt"] [data-flavor]:not([data-accent]),
306
+ [data-accent] [data-accent="volt"] [data-flavor]:not([data-accent]) {
307
+ --nw-accent: var(--nw-volt);
308
+ }
309
+ [data-accent="matrix"],
310
+ [data-accent="matrix"] [data-flavor]:not([data-accent]),
311
+ [data-accent] [data-accent="matrix"] [data-flavor]:not([data-accent]) {
312
+ --nw-accent: var(--nw-matrix);
313
+ }
314
+ [data-accent="circuit"],
315
+ [data-accent="circuit"] [data-flavor]:not([data-accent]),
316
+ [data-accent] [data-accent="circuit"] [data-flavor]:not([data-accent]) {
317
+ --nw-accent: var(--nw-circuit);
318
+ }
319
+ [data-accent="ice"],
320
+ [data-accent="ice"] [data-flavor]:not([data-accent]),
321
+ [data-accent] [data-accent="ice"] [data-flavor]:not([data-accent]) {
322
+ --nw-accent: var(--nw-ice);
323
+ }
324
+ [data-accent="arc"],
325
+ [data-accent="arc"] [data-flavor]:not([data-accent]),
326
+ [data-accent] [data-accent="arc"] [data-flavor]:not([data-accent]) {
327
+ --nw-accent: var(--nw-arc);
328
+ }
329
+ [data-accent="steel"],
330
+ [data-accent="steel"] [data-flavor]:not([data-accent]),
331
+ [data-accent] [data-accent="steel"] [data-flavor]:not([data-accent]) {
332
+ --nw-accent: var(--nw-steel);
333
+ }
334
+ }
@@ -0,0 +1,116 @@
1
+ @layer theme {
2
+ :root {
3
+ color-scheme: dark;
4
+ --nw-crust: #1b1136;
5
+ --nw-crust-rgb: 27 17 54;
6
+ --nw-mantle: #211540;
7
+ --nw-mantle-rgb: 33 21 64;
8
+ --nw-base: #271a4b;
9
+ --nw-base-rgb: 39 26 75;
10
+ --nw-surface0: #312457;
11
+ --nw-surface0-rgb: 49 36 87;
12
+ --nw-surface1: #3b2f61;
13
+ --nw-surface1-rgb: 59 47 97;
14
+ --nw-surface2: #453b6a;
15
+ --nw-surface2-rgb: 69 59 106;
16
+ --nw-overlay0: #59517a;
17
+ --nw-overlay0-rgb: 89 81 122;
18
+ --nw-overlay1: #7c7799;
19
+ --nw-overlay1-rgb: 124 119 153;
20
+ --nw-overlay2: #9793af;
21
+ --nw-overlay2-rgb: 151 147 175;
22
+ --nw-subtext0: #bab7cd;
23
+ --nw-subtext0-rgb: 186 183 205;
24
+ --nw-subtext1: #d9d7e4;
25
+ --nw-subtext1-rgb: 217 215 228;
26
+ --nw-text: #f5f4fa;
27
+ --nw-text-rgb: 245 244 250;
28
+ --nw-indigo: #848fff;
29
+ --nw-indigo-rgb: 132 143 255;
30
+ --nw-iris: #cdc0ff;
31
+ --nw-iris-rgb: 205 192 255;
32
+ --nw-flux: #d071ff;
33
+ --nw-flux-rgb: 208 113 255;
34
+ --nw-synth: #ff47d8;
35
+ --nw-synth-rgb: 255 71 216;
36
+ --nw-alarm: #ff5d7b;
37
+ --nw-alarm-rgb: 255 93 123;
38
+ --nw-flare: #ff9845;
39
+ --nw-flare-rgb: 255 152 69;
40
+ --nw-volt: #f8e445;
41
+ --nw-volt-rgb: 248 228 69;
42
+ --nw-matrix: #4bf677;
43
+ --nw-matrix-rgb: 75 246 119;
44
+ --nw-circuit: #17edd5;
45
+ --nw-circuit-rgb: 23 237 213;
46
+ --nw-ice: #5eddfe;
47
+ --nw-ice-rgb: 94 221 254;
48
+ --nw-arc: #4aa9ff;
49
+ --nw-arc-rgb: 74 169 255;
50
+ --nw-steel: #b5bdd5;
51
+ --nw-steel-rgb: 181 189 213;
52
+ --nw-flavor-dark: 1;
53
+ --nw-on-accent: var(--nw-crust);
54
+ --nw-accent: var(--nw-indigo);
55
+ }
56
+ [data-accent="indigo"],
57
+ [data-accent="indigo"] [data-flavor]:not([data-accent]),
58
+ [data-accent] [data-accent="indigo"] [data-flavor]:not([data-accent]) {
59
+ --nw-accent: var(--nw-indigo);
60
+ }
61
+ [data-accent="iris"],
62
+ [data-accent="iris"] [data-flavor]:not([data-accent]),
63
+ [data-accent] [data-accent="iris"] [data-flavor]:not([data-accent]) {
64
+ --nw-accent: var(--nw-iris);
65
+ }
66
+ [data-accent="flux"],
67
+ [data-accent="flux"] [data-flavor]:not([data-accent]),
68
+ [data-accent] [data-accent="flux"] [data-flavor]:not([data-accent]) {
69
+ --nw-accent: var(--nw-flux);
70
+ }
71
+ [data-accent="synth"],
72
+ [data-accent="synth"] [data-flavor]:not([data-accent]),
73
+ [data-accent] [data-accent="synth"] [data-flavor]:not([data-accent]) {
74
+ --nw-accent: var(--nw-synth);
75
+ }
76
+ [data-accent="alarm"],
77
+ [data-accent="alarm"] [data-flavor]:not([data-accent]),
78
+ [data-accent] [data-accent="alarm"] [data-flavor]:not([data-accent]) {
79
+ --nw-accent: var(--nw-alarm);
80
+ }
81
+ [data-accent="flare"],
82
+ [data-accent="flare"] [data-flavor]:not([data-accent]),
83
+ [data-accent] [data-accent="flare"] [data-flavor]:not([data-accent]) {
84
+ --nw-accent: var(--nw-flare);
85
+ }
86
+ [data-accent="volt"],
87
+ [data-accent="volt"] [data-flavor]:not([data-accent]),
88
+ [data-accent] [data-accent="volt"] [data-flavor]:not([data-accent]) {
89
+ --nw-accent: var(--nw-volt);
90
+ }
91
+ [data-accent="matrix"],
92
+ [data-accent="matrix"] [data-flavor]:not([data-accent]),
93
+ [data-accent] [data-accent="matrix"] [data-flavor]:not([data-accent]) {
94
+ --nw-accent: var(--nw-matrix);
95
+ }
96
+ [data-accent="circuit"],
97
+ [data-accent="circuit"] [data-flavor]:not([data-accent]),
98
+ [data-accent] [data-accent="circuit"] [data-flavor]:not([data-accent]) {
99
+ --nw-accent: var(--nw-circuit);
100
+ }
101
+ [data-accent="ice"],
102
+ [data-accent="ice"] [data-flavor]:not([data-accent]),
103
+ [data-accent] [data-accent="ice"] [data-flavor]:not([data-accent]) {
104
+ --nw-accent: var(--nw-ice);
105
+ }
106
+ [data-accent="arc"],
107
+ [data-accent="arc"] [data-flavor]:not([data-accent]),
108
+ [data-accent] [data-accent="arc"] [data-flavor]:not([data-accent]) {
109
+ --nw-accent: var(--nw-arc);
110
+ }
111
+ [data-accent="steel"],
112
+ [data-accent="steel"] [data-flavor]:not([data-accent]),
113
+ [data-accent] [data-accent="steel"] [data-flavor]:not([data-accent]) {
114
+ --nw-accent: var(--nw-steel);
115
+ }
116
+ }
@@ -0,0 +1,71 @@
1
+ # Accessibility
2
+
3
+ > The palette's contrast gate with live results, focus rings, keyboard support, reduced motion and forced-colors fallbacks.
4
+
5
+ Nyxwire guarantees what a palette can guarantee: every color meant for text is readable on the backgrounds it is meant for, in every flavor. The rest (focus, keyboard, motion, layout) is built into the components and is yours to keep when you compose them.
6
+
7
+ ## Contrast gate
8
+
9
+ `pnpm check:contrast` runs the palette gate and exits with an error on any failure, so a color that drops below its threshold cannot be released. The table recomputes the WCAG 2.x rules from the published palette when this site is built. Each cell shows the weakest pair the rule covers.
10
+
11
+ _Live example: [Accessibility](https://nyxwire.dissidence.ovh/foundations/accessibility/)._
12
+
13
+ The gate also checks two things the table cannot show:
14
+
15
+ - **Accent separation.** No two accents inside one flavor may come within ΔE<sub>OK</sub> 0.06, so `volt` never reads as `flare` at a different size and `ice` never collapses into `arc`.
16
+ - **Identity.** Every flavor's `base` stays at least 0.03 ΔE<sub>OK</sub> from sixteen popular dark and light themes (Static Bloom, Catppuccin, Rose Pine, Tokyo Night, Dracula, Nord and friends), with 0.045 as an advisory margin. The gate prints APCA Lc values for text roles as information.
17
+
18
+ What follows from the table:
19
+
20
+ - `text` is 7:1 (AAA) on `crust`, `mantle`, `base` and `surface0`, and 4.5:1 on the raised fills; `subtext1` and `subtext0` are body-safe on the page backgrounds.
21
+ - Every accent is AA on `crust`, `mantle`, `base` and `surface0`, so colored text, links and soft badges stay readable in any accent scope.
22
+ - Soft badges and buttons sit on a 16% tint of their own color, so their text mixes the intent with `fg` per flavor (`--nw-soft-ink`: 100% in Abyss, 90% in Nocturne, 75% in Twilight, 70% in Lumen). That keeps them AA on the same four grounds.
23
+ - `on-accent` text is AA on every solid accent fill, which covers solid buttons and badges.
24
+ - `overlay1` (`line-strong`) meets the 3:1 non-text minimum for input borders and control edges; `overlay0` (`line`) is decorative only, and the circuit grid sits on it by design.
25
+
26
+ > **Caution**
27
+ >
28
+ > These are solid-color guarantees. Text over imagery, colors at reduced opacity, and new color
29
+ > pairs need checking where you use them: put text on a solid, glass or cut panel when the backdrop
30
+ > is loud.
31
+
32
+ ## Focus
33
+
34
+ Every focusable element gets a visible ring on keyboard focus: the base layer styles `:focus-visible` with a 2px outline in `--nw-ring` (the primary intent, so it follows `data-accent`) at a 2px offset, and interactive components add their intent glow on top. Tab through these controls to see it:
35
+
36
+ ```html
37
+ <button type="button" class="nw-btn nw-btn-primary">
38
+ Solid
39
+ </button>
40
+ <button type="button" class="nw-btn nw-btn-outline nw-btn-secondary">
41
+ Outline
42
+ </button>
43
+ <a class="nw-link" href="#focus">
44
+ Link
45
+ </a>
46
+ <input class="nw-input" aria-label="Callsign" placeholder="Callsign" />
47
+ ```
48
+
49
+ Tokens: `--nw-ring`, `--nw-ring-width` (2px) and `--nw-ring-offset` (2px). Do not remove the outline; restyle it through the tokens instead.
50
+
51
+ ## Keyboard
52
+
53
+ - **CSS components** build on native elements (`<button>`, `<a>`, `<details>`, `<dialog>`, `<meter>`, the Popover API), so keyboard behavior comes from the browser.
54
+ - **Vue components** wrap [Reka UI](https://reka-ui.com/) primitives: arrow-key roving focus in toolbars and toggle groups, typeahead in lists, Escape to close the topmost overlay, focus trapped inside dialogs and returned to the trigger on close, and the ARIA roles and states each pattern needs.
55
+ - Icon-only buttons need an accessible name: give them `aria-label`.
56
+
57
+ ## Motion
58
+
59
+ Decorative animation stops under `prefers-reduced-motion: reduce`: durations collapse to 0.01ms, loops run once, and `.nw-motion-essential` opts meaning-bearing motion (a spinner for pending work) back in. See [Effects & motion](effects-motion.md#motion).
60
+
61
+ ## Forced colors
62
+
63
+ Under `forced-colors: active` the motif utilities fall back to system colors: cut and wire surfaces become a plain `Canvas` box with a real border, the scanline overlay and circuit grid are removed, and buttons keep their state through `Highlight`/`HighlightText` rather than color. Disabled controls show as `GrayText`.
64
+
65
+ ## Color is never the only signal
66
+
67
+ Intent colors always travel with words or icons: alerts have titles, badges have text, meters show their value, and form errors are written out under the field with `aria-invalid` set. Keep that pairing when you compose your own components.
68
+
69
+ ## Targets
70
+
71
+ Control heights are 1.75rem (`xs`), 2rem (`sm`), 2.5rem (`md`, the default) and 3rem (`lg`), above the 24px WCAG 2.2 minimum. Inputs are 2.5rem tall. On touch layouts, prefer `md` or larger.
@@ -0,0 +1,114 @@
1
+ # Color roles
2
+
3
+ > Semantic color tokens, what each accent means, and the syntax highlighting roles, generated from @nyxwire/palette.
4
+
5
+ Components never reference a raw palette color. They use semantic roles, which resolve to a palette color in the nearest flavor scope. The same names work as CSS variables (`--nw-canvas`) and as Tailwind color keys (`bg-canvas`, `text-fg-muted`, `border-line-strong`). Raw palette keys carry an `nw-` prefix in Tailwind (`bg-nw-indigo`) so the neutral named `base` cannot collide with `text-base`.
6
+
7
+ ## Semantic tokens
8
+
9
+ Generated from `semanticRoles`. The swatches are the token resolved in each flavor.
10
+
11
+ | CSS variable | Tailwind key | Palette | Abyss | Nocturne | Twilight | Lumen |
12
+ | --- | --- | --- | --- | --- | --- | --- |
13
+ | `--nw-canvas` | `canvas` | `base` | `#080720` | `#14093e` | `#271a4b` | `#eae6ff` |
14
+ | `--nw-canvas-subtle` | `canvas-subtle` | `mantle` | `#050419` | `#0e0533` | `#211540` | `#dedaff` |
15
+ | `--nw-canvas-sunken` | `canvas-sunken` | `crust` | `#030312` | `#0a0329` | `#1b1136` | `#d3cefa` |
16
+ | `--nw-panel` | `panel` | `surface0` | `#12122f` | `#1d154c` | `#312457` | `#ddd9ff` |
17
+ | `--nw-panel-hover` | `panel-hover` | `surface1` | `#1b1c3b` | `#272258` | `#3b2f61` | `#d1cdf8` |
18
+ | `--nw-panel-active` | `panel-active` | `surface2` | `#262747` | `#302d60` | `#453b6a` | `#c6c1ef` |
19
+ | `--nw-fg` | `fg` | `text` | `#f0f1f7` | `#f2f3fa` | `#f5f4fa` | `#1f0e47` |
20
+ | `--nw-fg-muted` | `fg-muted` | `subtext1` | `#d0d2dd` | `#d4d4e3` | `#d9d7e4` | `#3d326b` |
21
+ | `--nw-fg-subtle` | `fg-subtle` | `subtext0` | `#aeb0c1` | `#b2b4ca` | `#bab7cd` | `#524a7e` |
22
+ | `--nw-fg-faint` | `fg-faint` | `overlay2` | `#82849b` | `#8b8cab` | `#9793af` | `#686191` |
23
+ | `--nw-fg-disabled` | `fg-disabled` | `overlay1` | `#646781` | `#6c6d93` | `#7c7799` | `#7c76a4` |
24
+ | `--nw-line` | `line` | `overlay0` | `#3e415f` | `#464673` | `#59517a` | `#b0abd9` |
25
+ | `--nw-line-strong` | `line-strong` | `overlay1` | `#646781` | `#6c6d93` | `#7c7799` | `#7c76a4` |
26
+ | `--nw-line-bright` | `line-bright` | `overlay2` | `#82849b` | `#8b8cab` | `#9793af` | `#686191` |
27
+ | `--nw-primary` | `primary` | `indigo` | `#848fff` | `#848fff` | `#848fff` | `#4940d7` |
28
+ | `--nw-secondary` | `secondary` | `synth` | `#ff47d8` | `#ff47d8` | `#ff47d8` | `#a8008b` |
29
+ | `--nw-tertiary` | `tertiary` | `ice` | `#5eddfe` | `#5eddfe` | `#5eddfe` | `#006081` |
30
+ | `--nw-info` | `info` | `arc` | `#4aa9ff` | `#4aa9ff` | `#4aa9ff` | `#0055b6` |
31
+ | `--nw-success` | `success` | `matrix` | `#4bf677` | `#4bf677` | `#4bf677` | `#00680f` |
32
+ | `--nw-warning` | `warning` | `volt` | `#f8e445` | `#f8e445` | `#f8e445` | `#6e5700` |
33
+ | `--nw-danger` | `danger` | `alarm` | `#ff5d7b` | `#ff5d7b` | `#ff5d7b` | `#b6002c` |
34
+ | `--nw-ring` | `ring` | `indigo` | `#848fff` | `#848fff` | `#848fff` | `#4940d7` |
35
+ | `--nw-link` | `link` | `iris` | `#cdc0ff` | `#cdc0ff` | `#cdc0ff` | `#6746a7` |
36
+
37
+ - **Surfaces**: `canvas` is the page; `canvas-subtle` holds sidebars, navigation and inputs; `canvas-sunken` holds app chrome, HUD backdrops and code. `panel` raises cards, menus and popovers, with `panel-hover` and `panel-active` for interaction.
38
+ - **Text**: `fg` for body text, `fg-muted` for secondary text, `fg-subtle` for placeholders, `fg-faint` for icons and comments, `fg-disabled` for disabled controls.
39
+ - **Lines**: `line` for decorative hairlines and the circuit grid, `line-strong` for component boundaries such as input borders (3:1 or better), `line-bright` for emphasis.
40
+ - **Intents**: `primary` (or the `data-accent` choice), `secondary`, `tertiary`, `info`, `success`, `warning`, `danger`. `ring` follows `primary`; `link` stays `iris` so links keep their color under any accent.
41
+
42
+ ## Derived tokens
43
+
44
+ These are built with `color-mix()` in `@nyxwire/css` and have no palette entry of their own.
45
+
46
+ | CSS variable | Value | Tailwind key |
47
+ | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
48
+ | `--nw-on-<intent>` | `--nw-on-accent`: text on a solid intent fill (`crust` on dark flavors, `base` on Lumen) | `on-primary`, `on-secondary`, `on-tertiary`, `on-info`, `on-success`, `on-warning`, `on-danger` |
49
+ | `--nw-<intent>-soft` | intent at 16% over transparent | `primary-soft`, `secondary-soft`, `tertiary-soft`, `info-soft`, `success-soft`, `warning-soft`, `danger-soft` |
50
+ | `--nw-soft-ink` | share of the intent in text on its own soft tint, the rest is `fg`: 100% in Abyss, 90% in Nocturne, 75% in Twilight, 70% in Lumen | none (CSS only) |
51
+ | `--nw-selection` | `primary` at 32% | `selection` |
52
+ | `--nw-backdrop` | `shadow-ink` at up to 72%, behind dialogs | `backdrop` |
53
+ | `--nw-glass` | `canvas` at 78%, for panels over imagery | `glass` |
54
+ | `--nw-shadow-ink` | `crust` on dark flavors, `text` on Lumen; the ink of shadows and scrims | `shadow-ink` |
55
+
56
+ ## Accents
57
+
58
+ Every accent passes 4.5:1 on `crust`, `mantle`, `base` and `surface0` in its flavor, so any of them can be used for text. Meanings stay stable across flavors:
59
+
60
+ | Accent | Roles | CSS variable | Tailwind key | Nocturne | Lumen |
61
+ | --- | --- | --- | --- | --- | --- |
62
+ | indigo | `primary`, `ring` | `--nw-indigo` | `nw-indigo` | `#848fff` | `#4940d7` |
63
+ | iris | `link` | `--nw-iris` | `nw-iris` | `#cdc0ff` | `#6746a7` |
64
+ | flux | | `--nw-flux` | `nw-flux` | `#d071ff` | `#8c16c5` |
65
+ | synth | `secondary` | `--nw-synth` | `nw-synth` | `#ff47d8` | `#a8008b` |
66
+ | alarm | `danger` | `--nw-alarm` | `nw-alarm` | `#ff5d7b` | `#b6002c` |
67
+ | flare | | `--nw-flare` | `nw-flare` | `#ff9845` | `#9d3a00` |
68
+ | volt | `warning` | `--nw-volt` | `nw-volt` | `#f8e445` | `#6e5700` |
69
+ | matrix | `success` | `--nw-matrix` | `nw-matrix` | `#4bf677` | `#00680f` |
70
+ | circuit | | `--nw-circuit` | `nw-circuit` | `#17edd5` | `#006558` |
71
+ | ice | `tertiary` | `--nw-ice` | `nw-ice` | `#5eddfe` | `#006081` |
72
+ | arc | `info` | `--nw-arc` | `nw-arc` | `#4aa9ff` | `#0055b6` |
73
+ | steel | | `--nw-steel` | `nw-steel` | `#b5bdd5` | `#4d5976` |
74
+
75
+ ## Syntax roles
76
+
77
+ Generated from `syntaxRoles` and used by the [Expressive Code themes](https://nyxwire.dissidence.ovh/starlight/setup/) of the Starlight plugin. Code backgrounds are `crust`; dark flavors share the token colors.
78
+
79
+ | Role | Palette | Style | Nocturne | Lumen |
80
+ | --- | --- | --- | --- | --- |
81
+ | `keyword` | `flux` | | `#d071ff` | `#8c16c5` |
82
+ | `storage` | `synth` | | `#ff47d8` | `#a8008b` |
83
+ | `modifier` | `synth` | | `#ff47d8` | `#a8008b` |
84
+ | `string` | `matrix` | | `#4bf677` | `#00680f` |
85
+ | `number` | `flare` | | `#ff9845` | `#9d3a00` |
86
+ | `constant` | `flare` | | `#ff9845` | `#9d3a00` |
87
+ | `boolean` | `alarm` | | `#ff5d7b` | `#b6002c` |
88
+ | `null` | `alarm` | | `#ff5d7b` | `#b6002c` |
89
+ | `function` | `arc` | | `#4aa9ff` | `#0055b6` |
90
+ | `method` | `arc` | | `#4aa9ff` | `#0055b6` |
91
+ | `type` | `volt` | | `#f8e445` | `#6e5700` |
92
+ | `class` | `volt` | | `#f8e445` | `#6e5700` |
93
+ | `interface` | `volt` | | `#f8e445` | `#6e5700` |
94
+ | `enum` | `volt` | | `#f8e445` | `#6e5700` |
95
+ | `namespace` | `volt` | | `#f8e445` | `#6e5700` |
96
+ | `variable` | `text` | | `#f2f3fa` | `#1f0e47` |
97
+ | `parameter` | `iris` | | `#cdc0ff` | `#6746a7` |
98
+ | `property` | `ice` | | `#5eddfe` | `#006081` |
99
+ | `tag` | `synth` | | `#ff47d8` | `#a8008b` |
100
+ | `attribute` | `circuit` | | `#17edd5` | `#006558` |
101
+ | `operator` | `circuit` | | `#17edd5` | `#006558` |
102
+ | `punctuation` | `overlay2` | | `#8b8cab` | `#686191` |
103
+ | `comment` | `overlay2` | italic | `#8b8cab` | `#686191` |
104
+ | `regex` | `circuit` | | `#17edd5` | `#006558` |
105
+ | `escape` | `synth` | | `#ff47d8` | `#a8008b` |
106
+ | `decorator` | `synth` | | `#ff47d8` | `#a8008b` |
107
+ | `markup-heading` | `indigo` | | `#848fff` | `#4940d7` |
108
+ | `markup-link` | `iris` | | `#cdc0ff` | `#6746a7` |
109
+ | `inserted` | `matrix` | | `#4bf677` | `#00680f` |
110
+ | `deleted` | `alarm` | | `#ff5d7b` | `#b6002c` |
111
+ | `changed` | `volt` | | `#f8e445` | `#6e5700` |
112
+ | `editor-bg` | `crust` | | `#0a0329` | `#d3cefa` |
113
+ | `selection` | `indigo` | 30% opacity | `#848fff` | `#4940d7` |
114
+ | `line-highlight` | `surface0` | | `#1d154c` | `#ddd9ff` |