@adea-ai/themes 0.11.9 → 0.11.13
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.
- package/dist/accents.d.ts +19 -19
- package/dist/accents.d.ts.map +1 -1
- package/dist/accents.js +45 -93
- package/dist/accents.js.map +1 -1
- package/dist/adapters/base24.d.ts +21 -12
- package/dist/adapters/base24.d.ts.map +1 -1
- package/dist/adapters/base24.js +47 -72
- package/dist/adapters/base24.js.map +1 -1
- package/dist/adapters/css-variables.d.ts +29 -0
- package/dist/adapters/css-variables.d.ts.map +1 -0
- package/dist/adapters/css-variables.js +56 -0
- package/dist/adapters/css-variables.js.map +1 -0
- package/dist/adapters/css.d.ts +2 -4
- package/dist/adapters/css.d.ts.map +1 -1
- package/dist/adapters/css.js +7 -39
- package/dist/adapters/css.js.map +1 -1
- package/dist/adapters/shadcn.d.ts +8 -4
- package/dist/adapters/shadcn.d.ts.map +1 -1
- package/dist/adapters/shadcn.js +38 -57
- package/dist/adapters/shadcn.js.map +1 -1
- package/dist/adapters/shiki.d.ts +2 -10
- package/dist/adapters/shiki.d.ts.map +1 -1
- package/dist/adapters/shiki.js +16 -29
- package/dist/adapters/shiki.js.map +1 -1
- package/dist/adapters/tailwind.d.ts +3 -3
- package/dist/adapters/tailwind.d.ts.map +1 -1
- package/dist/adapters/tailwind.js +7 -28
- package/dist/adapters/tailwind.js.map +1 -1
- package/dist/adapters/xterm.d.ts.map +1 -1
- package/dist/adapters/xterm.js +9 -21
- package/dist/adapters/xterm.js.map +1 -1
- package/dist/base24-synthesis.d.ts +31 -0
- package/dist/base24-synthesis.d.ts.map +1 -0
- package/dist/base24-synthesis.js +25 -0
- package/dist/base24-synthesis.js.map +1 -0
- package/dist/derive.d.ts +1 -1
- package/dist/derive.d.ts.map +1 -1
- package/dist/derive.js +11 -26
- package/dist/derive.js.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/normalize.d.ts +0 -8
- package/dist/normalize.d.ts.map +1 -1
- package/dist/normalize.js +105 -232
- package/dist/normalize.js.map +1 -1
- package/dist/oklch.d.ts +1 -7
- package/dist/oklch.d.ts.map +1 -1
- package/dist/oklch.js +15 -35
- package/dist/oklch.js.map +1 -1
- package/dist/policy.d.ts +14 -4
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +16 -4
- package/dist/policy.js.map +1 -1
- package/dist/render.d.ts +30 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +74 -0
- package/dist/render.js.map +1 -0
- package/dist/sources.d.ts +26 -33
- package/dist/sources.d.ts.map +1 -1
- package/dist/sources.js +136 -305
- package/dist/sources.js.map +1 -1
- package/dist/step-search.d.ts +10 -0
- package/dist/step-search.d.ts.map +1 -0
- package/dist/step-search.js +21 -0
- package/dist/step-search.js.map +1 -0
- package/dist/theme-token-projection-script.js +1 -1
- package/dist/theme-token-projection.d.ts +34 -3
- package/dist/theme-token-projection.d.ts.map +1 -1
- package/dist/theme-token-projection.js +78 -2
- package/dist/theme-token-projection.js.map +1 -1
- package/dist/validate.d.ts +12 -17
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +17 -63
- package/dist/validate.js.map +1 -1
- package/package.json +1 -1
- package/src/accents.ts +57 -96
- package/src/adapters/base24.ts +53 -75
- package/src/adapters/css-variables.ts +67 -0
- package/src/adapters/css.ts +9 -54
- package/src/adapters/shadcn.ts +34 -60
- package/src/adapters/shiki.ts +17 -30
- package/src/adapters/tailwind.ts +7 -37
- package/src/adapters/xterm.ts +9 -21
- package/src/base24-synthesis.ts +29 -0
- package/src/derive.ts +12 -27
- package/src/index.ts +6 -5
- package/src/normalize.ts +140 -267
- package/src/oklch.ts +20 -35
- package/src/policy.ts +18 -4
- package/src/render.ts +82 -0
- package/src/sources.ts +160 -330
- package/src/step-search.ts +25 -0
- package/src/theme-token-projection.ts +126 -12
- package/src/validate.ts +31 -74
- package/dist/theme-token-projection-core.d.ts +0 -35
- package/dist/theme-token-projection-core.d.ts.map +0 -1
- package/dist/theme-token-projection-core.js +0 -84
- package/dist/theme-token-projection-core.js.map +0 -1
- package/src/theme-token-projection-core.ts +0 -131
package/src/sources.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What the catalogue contains, and where each palette came from.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* `scripts/vendor-palettes.ts` reproduces from upstream,
|
|
6
|
-
*
|
|
4
|
+
* Three lists. {@link VENDORED_SOURCES} names the Base24 schemes that
|
|
5
|
+
* `scripts/vendor-palettes.ts` reproduces from upstream, {@link COMPOSED_SOURCES}
|
|
6
|
+
* the Adea themes it composes from two donor schemes, and {@link AUTHORED_SOURCES}
|
|
7
|
+
* Adea-owned themes that have no upstream palette to vendor. Together they
|
|
7
8
|
* are the catalogue's input; `scripts/build-catalogue.ts` runs them all through the
|
|
8
9
|
* normalizer and writes the committed output.
|
|
9
10
|
*
|
|
@@ -38,7 +39,8 @@
|
|
|
38
39
|
*/
|
|
39
40
|
|
|
40
41
|
import type { Base24Slot } from './adapters/base24.js'
|
|
41
|
-
import {
|
|
42
|
+
import { PAST_CANVAS_STEPS, pastCanvasDirection } from './base24-synthesis.js'
|
|
43
|
+
import { CONTRAST_FLOORS } from './policy.js'
|
|
42
44
|
import type { ShadcnThemeProjection, ThemeAppearance, ThemeProvenance } from './schema.js'
|
|
43
45
|
|
|
44
46
|
/** The dataset the Base24 schemes are reproduced from. */
|
|
@@ -61,14 +63,14 @@ export const ADEA_PROVENANCE: ThemeProvenance = Object.freeze({
|
|
|
61
63
|
})
|
|
62
64
|
|
|
63
65
|
/**
|
|
64
|
-
* A theme composed from **two** upstream palettes.
|
|
66
|
+
* A theme composed from **two** upstream palettes, which may be the same one.
|
|
65
67
|
*
|
|
66
|
-
* Adea's own
|
|
67
|
-
* hand-authored either.
|
|
68
|
-
* cursor and the selection come from a
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
68
|
+
* Adea's own themes are not copies of any published palette, and they are not
|
|
69
|
+
* hand-authored either. Each is a deliberate composition: the canvas, the greys, the
|
|
70
|
+
* cursor and the selection come from a *structure* donor, and the sixteen ANSI hues
|
|
71
|
+
* from a *hues* donor. The light members take a GitHub light canvas and GitHub's
|
|
72
|
+
* dark hues; the dark members name the same GitHub palette for both halves, so
|
|
73
|
+
* either half can later diverge.
|
|
72
74
|
*
|
|
73
75
|
* The split exists because the two properties are in tension inside one palette. A
|
|
74
76
|
* palette tuned for a comfortable canvas mutes its hues to agree with it; a palette
|
|
@@ -78,7 +80,7 @@ export const ADEA_PROVENANCE: ThemeProvenance = Object.freeze({
|
|
|
78
80
|
* ## Why it is composed rather than merged by hand
|
|
79
81
|
*
|
|
80
82
|
* The alternative was to read both palettes and paste the merged hex into
|
|
81
|
-
* `palettes/adea-
|
|
83
|
+
* `palettes/adea-light.json`. That works once and is wrong afterwards: nothing then
|
|
82
84
|
* records which donor each value came from, so neither donor could ever be
|
|
83
85
|
* refreshed. Composing in the vendor step keeps both parents named, keeps the values
|
|
84
86
|
* upstream's own bytes rather than a transcription, and makes "GitHub changed its
|
|
@@ -106,10 +108,10 @@ export interface ComposedSource {
|
|
|
106
108
|
/**
|
|
107
109
|
* Slots neither donor supplies, derived from one of them.
|
|
108
110
|
*
|
|
109
|
-
* `slots` and
|
|
110
|
-
* Base24 slot, and the vendor step
|
|
111
|
-
*
|
|
112
|
-
* "this value was computed" stay distinguishable in review.
|
|
111
|
+
* With `slots` and the orange and brown every composition takes from its hues donor
|
|
112
|
+
* (`SYNTHESISED_HUES`), these must cover every Base24 slot, and the vendor step
|
|
113
|
+
* asserts that rather than trusting it. The maps are separate so that "this value
|
|
114
|
+
* came from a donor" and "this value was computed" stay distinguishable in review.
|
|
113
115
|
*/
|
|
114
116
|
synthesise: Readonly<
|
|
115
117
|
Partial<
|
|
@@ -125,10 +127,9 @@ export interface ComposedSource {
|
|
|
125
127
|
* The greyscale ramp is normally *derived* by ranking a scheme's grey slots by
|
|
126
128
|
* measured contrast, because Base24 does not name `black`, `white` or
|
|
127
129
|
* `brightBlack` and light schemes invert them. That derivation is right for an
|
|
128
|
-
* imported palette and wrong here:
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* pinned to the donor's own values instead.
|
|
130
|
+
* imported palette and wrong here: the structure donor publishes a greyscale its
|
|
131
|
+
* author chose, and re-deriving it gives back something close but not equal. So
|
|
132
|
+
* the four roles are pinned to the donor's own values instead.
|
|
132
133
|
*/
|
|
133
134
|
ansiFromStructure: readonly ('black' | 'brightBlack' | 'white' | 'brightWhite')[]
|
|
134
135
|
/**
|
|
@@ -155,6 +156,107 @@ export interface ComposedSource {
|
|
|
155
156
|
provenance: ThemeProvenance
|
|
156
157
|
}
|
|
157
158
|
|
|
159
|
+
/**
|
|
160
|
+
* The slot map every Adea composition uses: the greys from the structure donor, the
|
|
161
|
+
* hues from the hue donor, both in the dataset's own role names.
|
|
162
|
+
*
|
|
163
|
+
* `base01` receives the structure donor's `black` rather than a background step: an
|
|
164
|
+
* ANSI black equal to the background is invisible as foreground text, which is the
|
|
165
|
+
* defect the normalizer's ramp notes describe. On a light donor that `black` is darker
|
|
166
|
+
* than the foreground, which is what an ANSI black should be on paper. Base24's bright
|
|
167
|
+
* slots run red, yellow, green, cyan, blue, magenta — not the ANSI order of yellow
|
|
168
|
+
* before green.
|
|
169
|
+
*/
|
|
170
|
+
const GITHUB_SLOTS = Object.freeze({
|
|
171
|
+
base00: ['structure', 'background'],
|
|
172
|
+
base01: ['structure', 'black'],
|
|
173
|
+
base02: ['structure', 'selection'],
|
|
174
|
+
base03: ['structure', 'brightBlack'],
|
|
175
|
+
base04: ['structure', 'white'],
|
|
176
|
+
base05: ['structure', 'foreground'],
|
|
177
|
+
base06: ['structure', 'brightWhite'],
|
|
178
|
+
base07: ['structure', 'brightWhite'],
|
|
179
|
+
base08: ['hues', 'red'],
|
|
180
|
+
base0A: ['hues', 'yellow'],
|
|
181
|
+
base0B: ['hues', 'green'],
|
|
182
|
+
base0C: ['hues', 'cyan'],
|
|
183
|
+
base0D: ['hues', 'blue'],
|
|
184
|
+
base0E: ['hues', 'purple'],
|
|
185
|
+
base12: ['hues', 'brightRed'],
|
|
186
|
+
base13: ['hues', 'brightYellow'],
|
|
187
|
+
base14: ['hues', 'brightGreen'],
|
|
188
|
+
base15: ['hues', 'brightCyan'],
|
|
189
|
+
base16: ['hues', 'brightBlue'],
|
|
190
|
+
base17: ['hues', 'brightPurple'],
|
|
191
|
+
} as const) satisfies ComposedSource['slots']
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Base24's `base10` and `base11`, slices of the structure donor's canvas that keep its
|
|
195
|
+
* hue: below the canvas on a dark scheme ("dark black", "darker than that") and beyond
|
|
196
|
+
* it on a light one, where the two slots are the light end of the ramp.
|
|
197
|
+
*/
|
|
198
|
+
function pastCanvas(appearance: ThemeAppearance): ComposedSource['synthesise'] {
|
|
199
|
+
const direction = pastCanvasDirection(appearance)
|
|
200
|
+
return {
|
|
201
|
+
base10: ['structure', 'background', { lighten: direction * PAST_CANVAS_STEPS.base10 }],
|
|
202
|
+
base11: ['structure', 'background', { lighten: direction * PAST_CANVAS_STEPS.base11 }],
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* What every member of the family shares.
|
|
208
|
+
*
|
|
209
|
+
* The accent is the donor's violet, which GitHub keeps constant across its colourblind
|
|
210
|
+
* and high-contrast palettes. Body text is held to AAA rather than the catalogue's AA,
|
|
211
|
+
* because these are the defaults rather than imported palettes; see `textFloor`.
|
|
212
|
+
*/
|
|
213
|
+
const ADEA_COMPOSITION = Object.freeze({
|
|
214
|
+
family: 'adea',
|
|
215
|
+
familyLabel: 'Adea',
|
|
216
|
+
ansiFromStructure: ['black', 'brightBlack', 'white', 'brightWhite'],
|
|
217
|
+
accentSlot: 'magenta',
|
|
218
|
+
textFloor: 7,
|
|
219
|
+
} as const)
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* The family canvas decision for the default and colourblind dark themes.
|
|
223
|
+
*
|
|
224
|
+
* GitHub's greyscale is cut blue (`h≈258`, chroma 0.014 on the canvas), which is
|
|
225
|
+
* exactly the tint a violet accent has to fight for. Halving the chroma and rotating
|
|
226
|
+
* the greyscale to violet-grey keeps every lightness relationship the ladder was built
|
|
227
|
+
* on and takes the tint out of the way. The hue slots are untouched.
|
|
228
|
+
*/
|
|
229
|
+
const RE_GREYED_DARK_CANVAS = Object.freeze({
|
|
230
|
+
palette: {
|
|
231
|
+
base00: '#111013',
|
|
232
|
+
base01: '#4f4d53',
|
|
233
|
+
base02: '#ecebef',
|
|
234
|
+
base03: '#76747a',
|
|
235
|
+
base04: '#bab8be',
|
|
236
|
+
base05: '#ecebef',
|
|
237
|
+
base10: '#0a0a0c',
|
|
238
|
+
base11: '#050506',
|
|
239
|
+
},
|
|
240
|
+
ansiOverrides: {
|
|
241
|
+
black: '#4f4d53',
|
|
242
|
+
brightBlack: '#76747a',
|
|
243
|
+
white: '#bab8be',
|
|
244
|
+
},
|
|
245
|
+
} as const)
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* The hue transpose for a light member, which puts GitHub's dark hues — drawn for a
|
|
249
|
+
* `#0d1117` canvas, and between 2.5:1 and 4.1:1 on a white one — onto paper.
|
|
250
|
+
*
|
|
251
|
+
* The target carries a margin over the floor because the step is set by the worst hue,
|
|
252
|
+
* so without one that hue lands exactly *on* the floor — and cyan, the hue that needs
|
|
253
|
+
* the largest step, is also the one whose conversion to sRGB sits furthest outside the
|
|
254
|
+
* gamut. A renderer that gamut-maps it by reducing chroma and one that clamps its
|
|
255
|
+
* channels disagree by about 0.3 of a ratio point there, so a value on the floor
|
|
256
|
+
* measures under it in the clamping case. The margin makes the guarantee hold for both.
|
|
257
|
+
*/
|
|
258
|
+
const TRANSPOSED_ONTO_PAPER = Object.freeze({ floor: CONTRAST_FLOORS.status + 0.4 })
|
|
259
|
+
|
|
158
260
|
/**
|
|
159
261
|
* Adea's managed family: two appearances × three accessibility variants.
|
|
160
262
|
*
|
|
@@ -167,11 +269,9 @@ export interface ComposedSource {
|
|
|
167
269
|
* | Adea Light Colorblind | GitHub Light Colorblind `#ffffff` | GitHub Dark Colorblind, transposed | its violet |
|
|
168
270
|
* | Adea Light High Contrast | GitHub Light High Contrast | GitHub Dark High Contrast, transposed | its violet |
|
|
169
271
|
*
|
|
170
|
-
* The
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* against a neutral ground instead of GitHub's blue one, and every variant's own
|
|
174
|
-
* accent is the accent slot — violet/magenta, which GitHub keeps constant across
|
|
272
|
+
* The dark canvases are re-greyed (chroma halved, hue rotated to violet-grey) so the
|
|
273
|
+
* family's violet accent reads against a neutral ground instead of GitHub's blue
|
|
274
|
+
* one, and every variant's own accent is the accent slot — violet/magenta, which GitHub keeps constant across
|
|
175
275
|
* all six of its palettes, colourblind and high-contrast included.
|
|
176
276
|
*
|
|
177
277
|
* The accessibility variants are compositions of GitHub's own accessibility
|
|
@@ -193,157 +293,36 @@ export const COMPOSED_SOURCES: readonly ComposedSource[] = Object.freeze([
|
|
|
193
293
|
{
|
|
194
294
|
id: 'adea-dark',
|
|
195
295
|
name: 'Adea Dark',
|
|
196
|
-
|
|
197
|
-
familyLabel: 'Adea',
|
|
296
|
+
...ADEA_COMPOSITION,
|
|
198
297
|
label: 'Dark',
|
|
199
298
|
description:
|
|
200
299
|
'The default dark theme: GitHub Dark Default with the canvas re-greyed to a violet-leaning neutral and the family violet accent, kept as a composition so the default can diverge from it one slot at a time.',
|
|
201
300
|
appearance: 'dark',
|
|
202
301
|
tags: ['dark', 'default', 'neutral'],
|
|
203
302
|
donors: { structure: 'github-dark-default', hues: 'github-dark-default' },
|
|
204
|
-
slots:
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
// which is the defect the normalizer's ramp notes describe.
|
|
208
|
-
base00: ['structure', 'background'],
|
|
209
|
-
base01: ['structure', 'black'],
|
|
210
|
-
base02: ['structure', 'selection'],
|
|
211
|
-
base03: ['structure', 'brightBlack'],
|
|
212
|
-
base04: ['structure', 'white'],
|
|
213
|
-
base05: ['structure', 'foreground'],
|
|
214
|
-
base06: ['structure', 'brightWhite'],
|
|
215
|
-
base07: ['structure', 'brightWhite'],
|
|
216
|
-
// The hue donor. Base24's bright slots run red, yellow, green, cyan, blue,
|
|
217
|
-
// magenta — not the ANSI order of yellow before green.
|
|
218
|
-
base08: ['hues', 'red'],
|
|
219
|
-
base0A: ['hues', 'yellow'],
|
|
220
|
-
base0B: ['hues', 'green'],
|
|
221
|
-
base0C: ['hues', 'cyan'],
|
|
222
|
-
base0D: ['hues', 'blue'],
|
|
223
|
-
base0E: ['hues', 'purple'],
|
|
224
|
-
base12: ['hues', 'brightRed'],
|
|
225
|
-
base13: ['hues', 'brightYellow'],
|
|
226
|
-
base14: ['hues', 'brightGreen'],
|
|
227
|
-
base15: ['hues', 'brightCyan'],
|
|
228
|
-
base16: ['hues', 'brightBlue'],
|
|
229
|
-
base17: ['hues', 'brightPurple'],
|
|
230
|
-
},
|
|
231
|
-
synthesise: {
|
|
232
|
-
// Neither donor's ANSI set has an orange or a brown, and Base24 defines both.
|
|
233
|
-
// A hue rotation off red and yellow is how the export adapter fills them too,
|
|
234
|
-
// so a composed scheme and an exported one are synthesised identically.
|
|
235
|
-
base09: ['hues', 'red', { rotate: 26 }],
|
|
236
|
-
base0F: ['hues', 'yellow', { rotate: -34 }],
|
|
237
|
-
// The two rungs below the canvas, which the specification defines as "dark
|
|
238
|
-
// black" and "darker than that". Lightness slices of the structure donor's own
|
|
239
|
-
// canvas, so the theme keeps its hue as it darkens.
|
|
240
|
-
base10: ['structure', 'background', { lighten: -0.03 }],
|
|
241
|
-
base11: ['structure', 'background', { lighten: -0.06 }],
|
|
242
|
-
},
|
|
243
|
-
ansiFromStructure: ['black', 'brightBlack', 'white', 'brightWhite'],
|
|
244
|
-
/*
|
|
245
|
-
* The family canvas decision: GitHub's greyscale is cut blue (`h≈258`, chroma
|
|
246
|
-
* 0.014 on the canvas), which is exactly the tint a violet accent has to fight
|
|
247
|
-
* for. Halving the chroma and rotating the greyscale to violet-grey keeps every
|
|
248
|
-
* lightness relationship the ladder was built on and takes the tint out of the
|
|
249
|
-
* way. The hue slots are untouched — the GitHub dark palette stays GitHub's.
|
|
250
|
-
*/
|
|
251
|
-
palette: {
|
|
252
|
-
base00: '#111013',
|
|
253
|
-
base01: '#4f4d53',
|
|
254
|
-
base02: '#ecebef',
|
|
255
|
-
base03: '#76747a',
|
|
256
|
-
base04: '#bab8be',
|
|
257
|
-
base05: '#ecebef',
|
|
258
|
-
base10: '#0a0a0c',
|
|
259
|
-
base11: '#050506',
|
|
260
|
-
},
|
|
261
|
-
ansiOverrides: {
|
|
262
|
-
black: '#4f4d53',
|
|
263
|
-
brightBlack: '#76747a',
|
|
264
|
-
white: '#bab8be',
|
|
265
|
-
},
|
|
266
|
-
// The family accent: the donor's violet, which GitHub keeps constant across its
|
|
267
|
-
// colourblind and high-contrast palettes too.
|
|
268
|
-
accentSlot: 'magenta',
|
|
269
|
-
// AAA rather than AA, because this is a default rather than an imported palette.
|
|
270
|
-
textFloor: 7,
|
|
303
|
+
slots: GITHUB_SLOTS,
|
|
304
|
+
synthesise: pastCanvas('dark'),
|
|
305
|
+
...RE_GREYED_DARK_CANVAS,
|
|
271
306
|
provenance: {
|
|
272
|
-
|
|
273
|
-
url: 'https://github.com/adea-ai/themes',
|
|
274
|
-
license: 'Apache-2.0',
|
|
307
|
+
...ADEA_PROVENANCE,
|
|
275
308
|
bootstrappedFrom: ['GitHub Dark Default (iTerm2-Color-Schemes)'],
|
|
276
309
|
},
|
|
277
310
|
},
|
|
278
311
|
{
|
|
279
312
|
id: 'adea-light',
|
|
280
313
|
name: 'Adea Light',
|
|
281
|
-
|
|
282
|
-
familyLabel: 'Adea',
|
|
314
|
+
...ADEA_COMPOSITION,
|
|
283
315
|
label: 'Light',
|
|
284
316
|
description:
|
|
285
317
|
"The default light theme: GitHub's own white canvas carrying the dark theme's hues, transposed to survive on paper, with the family violet accent.",
|
|
286
318
|
appearance: 'light',
|
|
287
319
|
tags: ['light', 'default', 'neutral'],
|
|
288
320
|
donors: { structure: 'github-light-default', hues: 'github-dark-default' },
|
|
289
|
-
slots:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
// (`#1f2328`), which is what an ANSI black should be on a light canvas — the
|
|
293
|
-
// darkest neutral sits below the body text, not above it.
|
|
294
|
-
base00: ['structure', 'background'],
|
|
295
|
-
base01: ['structure', 'black'],
|
|
296
|
-
base02: ['structure', 'selection'],
|
|
297
|
-
base03: ['structure', 'brightBlack'],
|
|
298
|
-
base04: ['structure', 'white'],
|
|
299
|
-
base05: ['structure', 'foreground'],
|
|
300
|
-
base06: ['structure', 'brightWhite'],
|
|
301
|
-
base07: ['structure', 'brightWhite'],
|
|
302
|
-
base08: ['hues', 'red'],
|
|
303
|
-
base0A: ['hues', 'yellow'],
|
|
304
|
-
base0B: ['hues', 'green'],
|
|
305
|
-
base0C: ['hues', 'cyan'],
|
|
306
|
-
base0D: ['hues', 'blue'],
|
|
307
|
-
base0E: ['hues', 'purple'],
|
|
308
|
-
base12: ['hues', 'brightRed'],
|
|
309
|
-
base13: ['hues', 'brightYellow'],
|
|
310
|
-
base14: ['hues', 'brightGreen'],
|
|
311
|
-
base15: ['hues', 'brightCyan'],
|
|
312
|
-
base16: ['hues', 'brightBlue'],
|
|
313
|
-
base17: ['hues', 'brightPurple'],
|
|
314
|
-
},
|
|
315
|
-
synthesise: {
|
|
316
|
-
base09: ['hues', 'red', { rotate: 26 }],
|
|
317
|
-
base0F: ['hues', 'yellow', { rotate: -34 }],
|
|
318
|
-
// Beyond the canvas rather than below it, which is the convention for a light
|
|
319
|
-
// scheme: these two slots are the light end of the ramp.
|
|
320
|
-
base10: ['structure', 'background', { lighten: 0.03 }],
|
|
321
|
-
base11: ['structure', 'background', { lighten: 0.06 }],
|
|
322
|
-
},
|
|
323
|
-
ansiFromStructure: ['black', 'brightBlack', 'white', 'brightWhite'],
|
|
324
|
-
// The family accent on paper: the transposed violet, dark enough to carry text
|
|
325
|
-
// against the white canvas. See the dark theme for the canvas decision.
|
|
326
|
-
accentSlot: 'magenta',
|
|
327
|
-
/*
|
|
328
|
-
* GitHub's hues were drawn for a `#0d1117` canvas. On Nord Light's they measure
|
|
329
|
-
* between 2.5:1 and 4.1:1, which is legible as an accent and not as terminal text.
|
|
330
|
-
*
|
|
331
|
-
* The target carries a margin over the floor, and the reason is specific: the step is
|
|
332
|
-
* set by the worst hue, so without a margin that hue lands exactly *on* the floor —
|
|
333
|
-
* and cyan, the hue that needs the largest step, is also the one whose conversion to
|
|
334
|
-
* sRGB sits furthest outside the gamut. A renderer that gamut-maps it by reducing
|
|
335
|
-
* chroma and one that clamps its channels disagree by about 0.3 of a ratio point
|
|
336
|
-
* there, so a value on the floor measures under it in the clamping case. The margin
|
|
337
|
-
* is what makes the guarantee hold for either.
|
|
338
|
-
*/
|
|
339
|
-
hueTranspose: { floor: CONTRAST_FLOORS.status + 0.4 },
|
|
340
|
-
// AAA rather than AA; see `textFloor`. The binding pair is text on a popover, since
|
|
341
|
-
// a light ladder descends away from its canvas.
|
|
342
|
-
textFloor: 7,
|
|
321
|
+
slots: GITHUB_SLOTS,
|
|
322
|
+
synthesise: pastCanvas('light'),
|
|
323
|
+
hueTranspose: TRANSPOSED_ONTO_PAPER,
|
|
343
324
|
provenance: {
|
|
344
|
-
|
|
345
|
-
url: 'https://github.com/adea-ai/themes',
|
|
346
|
-
license: 'Apache-2.0',
|
|
325
|
+
...ADEA_PROVENANCE,
|
|
347
326
|
bootstrappedFrom: [
|
|
348
327
|
'GitHub Light Default (iTerm2-Color-Schemes)',
|
|
349
328
|
'GitHub Dark Default (iTerm2-Color-Schemes)',
|
|
@@ -353,109 +332,34 @@ export const COMPOSED_SOURCES: readonly ComposedSource[] = Object.freeze([
|
|
|
353
332
|
{
|
|
354
333
|
id: 'adea-dark-colorblind',
|
|
355
334
|
name: 'Adea Dark Colorblind',
|
|
356
|
-
|
|
357
|
-
familyLabel: 'Adea',
|
|
335
|
+
...ADEA_COMPOSITION,
|
|
358
336
|
label: 'Dark Colorblind',
|
|
359
337
|
description:
|
|
360
338
|
"The colourblind dark variant: GitHub Dark Colorblind's hues on the family's re-greyed canvas, for deuteranopia and protanopia. The violet accent survives the adjustment untouched.",
|
|
361
339
|
appearance: 'dark',
|
|
362
340
|
tags: ['dark', 'default', 'colorblind'],
|
|
363
341
|
donors: { structure: 'github-dark-colorblind', hues: 'github-dark-colorblind' },
|
|
364
|
-
slots:
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
base03: ['structure', 'brightBlack'],
|
|
369
|
-
base04: ['structure', 'white'],
|
|
370
|
-
base05: ['structure', 'foreground'],
|
|
371
|
-
base06: ['structure', 'brightWhite'],
|
|
372
|
-
base07: ['structure', 'brightWhite'],
|
|
373
|
-
base08: ['hues', 'red'],
|
|
374
|
-
base0A: ['hues', 'yellow'],
|
|
375
|
-
base0B: ['hues', 'green'],
|
|
376
|
-
base0C: ['hues', 'cyan'],
|
|
377
|
-
base0D: ['hues', 'blue'],
|
|
378
|
-
base0E: ['hues', 'purple'],
|
|
379
|
-
base12: ['hues', 'brightRed'],
|
|
380
|
-
base13: ['hues', 'brightYellow'],
|
|
381
|
-
base14: ['hues', 'brightGreen'],
|
|
382
|
-
base15: ['hues', 'brightCyan'],
|
|
383
|
-
base16: ['hues', 'brightBlue'],
|
|
384
|
-
base17: ['hues', 'brightPurple'],
|
|
385
|
-
},
|
|
386
|
-
synthesise: {
|
|
387
|
-
base09: ['hues', 'red', { rotate: 26 }],
|
|
388
|
-
base0F: ['hues', 'yellow', { rotate: -34 }],
|
|
389
|
-
base10: ['structure', 'background', { lighten: -0.03 }],
|
|
390
|
-
base11: ['structure', 'background', { lighten: -0.06 }],
|
|
391
|
-
},
|
|
392
|
-
ansiFromStructure: ['black', 'brightBlack', 'white', 'brightWhite'],
|
|
393
|
-
// The same canvas decision as the default dark theme; the colourblind donor's
|
|
394
|
-
// greyscale is identical to the default donor's, so the corrections match.
|
|
395
|
-
palette: {
|
|
396
|
-
base00: '#111013',
|
|
397
|
-
base01: '#4f4d53',
|
|
398
|
-
base02: '#ecebef',
|
|
399
|
-
base03: '#76747a',
|
|
400
|
-
base04: '#bab8be',
|
|
401
|
-
base05: '#ecebef',
|
|
402
|
-
base10: '#0a0a0c',
|
|
403
|
-
base11: '#050506',
|
|
404
|
-
},
|
|
405
|
-
ansiOverrides: {
|
|
406
|
-
black: '#4f4d53',
|
|
407
|
-
brightBlack: '#76747a',
|
|
408
|
-
white: '#bab8be',
|
|
409
|
-
},
|
|
410
|
-
accentSlot: 'magenta',
|
|
411
|
-
textFloor: 7,
|
|
342
|
+
slots: GITHUB_SLOTS,
|
|
343
|
+
synthesise: pastCanvas('dark'),
|
|
344
|
+
// The colourblind donor's greyscale is identical to the default donor's.
|
|
345
|
+
...RE_GREYED_DARK_CANVAS,
|
|
412
346
|
provenance: {
|
|
413
|
-
|
|
414
|
-
url: 'https://github.com/adea-ai/themes',
|
|
415
|
-
license: 'Apache-2.0',
|
|
347
|
+
...ADEA_PROVENANCE,
|
|
416
348
|
bootstrappedFrom: ['GitHub Dark Colorblind (iTerm2-Color-Schemes)'],
|
|
417
349
|
},
|
|
418
350
|
},
|
|
419
351
|
{
|
|
420
352
|
id: 'adea-dark-high-contrast',
|
|
421
353
|
name: 'Adea Dark High Contrast',
|
|
422
|
-
|
|
423
|
-
familyLabel: 'Adea',
|
|
354
|
+
...ADEA_COMPOSITION,
|
|
424
355
|
label: 'Dark High Contrast',
|
|
425
356
|
description:
|
|
426
357
|
"The high-contrast dark variant: GitHub Dark High Contrast's near-black canvas re-greyed to the family neutral, carrying its own high-contrast hues and violet accent.",
|
|
427
358
|
appearance: 'dark',
|
|
428
359
|
tags: ['dark', 'default', 'high-contrast'],
|
|
429
360
|
donors: { structure: 'github-dark-high-contrast', hues: 'github-dark-high-contrast' },
|
|
430
|
-
slots:
|
|
431
|
-
|
|
432
|
-
base01: ['structure', 'black'],
|
|
433
|
-
base02: ['structure', 'selection'],
|
|
434
|
-
base03: ['structure', 'brightBlack'],
|
|
435
|
-
base04: ['structure', 'white'],
|
|
436
|
-
base05: ['structure', 'foreground'],
|
|
437
|
-
base06: ['structure', 'brightWhite'],
|
|
438
|
-
base07: ['structure', 'brightWhite'],
|
|
439
|
-
base08: ['hues', 'red'],
|
|
440
|
-
base0A: ['hues', 'yellow'],
|
|
441
|
-
base0B: ['hues', 'green'],
|
|
442
|
-
base0C: ['hues', 'cyan'],
|
|
443
|
-
base0D: ['hues', 'blue'],
|
|
444
|
-
base0E: ['hues', 'purple'],
|
|
445
|
-
base12: ['hues', 'brightRed'],
|
|
446
|
-
base13: ['hues', 'brightYellow'],
|
|
447
|
-
base14: ['hues', 'brightGreen'],
|
|
448
|
-
base15: ['hues', 'brightCyan'],
|
|
449
|
-
base16: ['hues', 'brightBlue'],
|
|
450
|
-
base17: ['hues', 'brightPurple'],
|
|
451
|
-
},
|
|
452
|
-
synthesise: {
|
|
453
|
-
base09: ['hues', 'red', { rotate: 26 }],
|
|
454
|
-
base0F: ['hues', 'yellow', { rotate: -34 }],
|
|
455
|
-
base10: ['structure', 'background', { lighten: -0.03 }],
|
|
456
|
-
base11: ['structure', 'background', { lighten: -0.06 }],
|
|
457
|
-
},
|
|
458
|
-
ansiFromStructure: ['black', 'brightBlack', 'white', 'brightWhite'],
|
|
361
|
+
slots: GITHUB_SLOTS,
|
|
362
|
+
synthesise: pastCanvas('dark'),
|
|
459
363
|
// The HC canvas is already near-black, so the correction is almost entirely
|
|
460
364
|
// de-tinting: the chroma was half the default's to begin with.
|
|
461
365
|
palette: {
|
|
@@ -473,61 +377,26 @@ export const COMPOSED_SOURCES: readonly ComposedSource[] = Object.freeze([
|
|
|
473
377
|
brightBlack: '#a7a5ac',
|
|
474
378
|
white: '#dedde0',
|
|
475
379
|
},
|
|
476
|
-
accentSlot: 'magenta',
|
|
477
380
|
provenance: {
|
|
478
|
-
|
|
479
|
-
url: 'https://github.com/adea-ai/themes',
|
|
480
|
-
license: 'Apache-2.0',
|
|
381
|
+
...ADEA_PROVENANCE,
|
|
481
382
|
bootstrappedFrom: ['GitHub Dark High Contrast (iTerm2-Color-Schemes)'],
|
|
482
383
|
},
|
|
483
384
|
},
|
|
484
385
|
{
|
|
485
386
|
id: 'adea-light-colorblind',
|
|
486
387
|
name: 'Adea Light Colorblind',
|
|
487
|
-
|
|
488
|
-
familyLabel: 'Adea',
|
|
388
|
+
...ADEA_COMPOSITION,
|
|
489
389
|
label: 'Light Colorblind',
|
|
490
390
|
description:
|
|
491
391
|
"The colourblind light variant: GitHub's white colourblind canvas carrying the dark colourblind hues, transposed to survive on paper — the same red is the same red as the dark colourblind variant.",
|
|
492
392
|
appearance: 'light',
|
|
493
393
|
tags: ['light', 'default', 'colorblind'],
|
|
494
394
|
donors: { structure: 'github-light-colorblind', hues: 'github-dark-colorblind' },
|
|
495
|
-
slots:
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
base02: ['structure', 'selection'],
|
|
499
|
-
base03: ['structure', 'brightBlack'],
|
|
500
|
-
base04: ['structure', 'white'],
|
|
501
|
-
base05: ['structure', 'foreground'],
|
|
502
|
-
base06: ['structure', 'brightWhite'],
|
|
503
|
-
base07: ['structure', 'brightWhite'],
|
|
504
|
-
base08: ['hues', 'red'],
|
|
505
|
-
base0A: ['hues', 'yellow'],
|
|
506
|
-
base0B: ['hues', 'green'],
|
|
507
|
-
base0C: ['hues', 'cyan'],
|
|
508
|
-
base0D: ['hues', 'blue'],
|
|
509
|
-
base0E: ['hues', 'purple'],
|
|
510
|
-
base12: ['hues', 'brightRed'],
|
|
511
|
-
base13: ['hues', 'brightYellow'],
|
|
512
|
-
base14: ['hues', 'brightGreen'],
|
|
513
|
-
base15: ['hues', 'brightCyan'],
|
|
514
|
-
base16: ['hues', 'brightBlue'],
|
|
515
|
-
base17: ['hues', 'brightPurple'],
|
|
516
|
-
},
|
|
517
|
-
synthesise: {
|
|
518
|
-
base09: ['hues', 'red', { rotate: 26 }],
|
|
519
|
-
base0F: ['hues', 'yellow', { rotate: -34 }],
|
|
520
|
-
base10: ['structure', 'background', { lighten: 0.03 }],
|
|
521
|
-
base11: ['structure', 'background', { lighten: 0.06 }],
|
|
522
|
-
},
|
|
523
|
-
ansiFromStructure: ['black', 'brightBlack', 'white', 'brightWhite'],
|
|
524
|
-
accentSlot: 'magenta',
|
|
525
|
-
hueTranspose: { floor: CONTRAST_FLOORS.status + 0.4 },
|
|
526
|
-
textFloor: 7,
|
|
395
|
+
slots: GITHUB_SLOTS,
|
|
396
|
+
synthesise: pastCanvas('light'),
|
|
397
|
+
hueTranspose: TRANSPOSED_ONTO_PAPER,
|
|
527
398
|
provenance: {
|
|
528
|
-
|
|
529
|
-
url: 'https://github.com/adea-ai/themes',
|
|
530
|
-
license: 'Apache-2.0',
|
|
399
|
+
...ADEA_PROVENANCE,
|
|
531
400
|
bootstrappedFrom: [
|
|
532
401
|
'GitHub Light Colorblind (iTerm2-Color-Schemes)',
|
|
533
402
|
'GitHub Dark Colorblind (iTerm2-Color-Schemes)',
|
|
@@ -537,50 +406,18 @@ export const COMPOSED_SOURCES: readonly ComposedSource[] = Object.freeze([
|
|
|
537
406
|
{
|
|
538
407
|
id: 'adea-light-high-contrast',
|
|
539
408
|
name: 'Adea Light High Contrast',
|
|
540
|
-
|
|
541
|
-
familyLabel: 'Adea',
|
|
409
|
+
...ADEA_COMPOSITION,
|
|
542
410
|
label: 'Light High Contrast',
|
|
543
411
|
description:
|
|
544
412
|
"The high-contrast light variant: GitHub's white high-contrast canvas carrying the dark high-contrast hues, transposed — the paper counterpart of the dark high-contrast variant.",
|
|
545
413
|
appearance: 'light',
|
|
546
414
|
tags: ['light', 'default', 'high-contrast'],
|
|
547
415
|
donors: { structure: 'github-light-high-contrast', hues: 'github-dark-high-contrast' },
|
|
548
|
-
slots:
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
base02: ['structure', 'selection'],
|
|
552
|
-
base03: ['structure', 'brightBlack'],
|
|
553
|
-
base04: ['structure', 'white'],
|
|
554
|
-
base05: ['structure', 'foreground'],
|
|
555
|
-
base06: ['structure', 'brightWhite'],
|
|
556
|
-
base07: ['structure', 'brightWhite'],
|
|
557
|
-
base08: ['hues', 'red'],
|
|
558
|
-
base0A: ['hues', 'yellow'],
|
|
559
|
-
base0B: ['hues', 'green'],
|
|
560
|
-
base0C: ['hues', 'cyan'],
|
|
561
|
-
base0D: ['hues', 'blue'],
|
|
562
|
-
base0E: ['hues', 'purple'],
|
|
563
|
-
base12: ['hues', 'brightRed'],
|
|
564
|
-
base13: ['hues', 'brightYellow'],
|
|
565
|
-
base14: ['hues', 'brightGreen'],
|
|
566
|
-
base15: ['hues', 'brightCyan'],
|
|
567
|
-
base16: ['hues', 'brightBlue'],
|
|
568
|
-
base17: ['hues', 'brightPurple'],
|
|
569
|
-
},
|
|
570
|
-
synthesise: {
|
|
571
|
-
base09: ['hues', 'red', { rotate: 26 }],
|
|
572
|
-
base0F: ['hues', 'yellow', { rotate: -34 }],
|
|
573
|
-
base10: ['structure', 'background', { lighten: 0.03 }],
|
|
574
|
-
base11: ['structure', 'background', { lighten: 0.06 }],
|
|
575
|
-
},
|
|
576
|
-
ansiFromStructure: ['black', 'brightBlack', 'white', 'brightWhite'],
|
|
577
|
-
accentSlot: 'magenta',
|
|
578
|
-
hueTranspose: { floor: CONTRAST_FLOORS.status + 0.4 },
|
|
579
|
-
textFloor: 7,
|
|
416
|
+
slots: GITHUB_SLOTS,
|
|
417
|
+
synthesise: pastCanvas('light'),
|
|
418
|
+
hueTranspose: TRANSPOSED_ONTO_PAPER,
|
|
580
419
|
provenance: {
|
|
581
|
-
|
|
582
|
-
url: 'https://github.com/adea-ai/themes',
|
|
583
|
-
license: 'Apache-2.0',
|
|
420
|
+
...ADEA_PROVENANCE,
|
|
584
421
|
bootstrappedFrom: [
|
|
585
422
|
'GitHub Light High Contrast (iTerm2-Color-Schemes)',
|
|
586
423
|
'GitHub Dark High Contrast (iTerm2-Color-Schemes)',
|
|
@@ -1085,11 +922,8 @@ export const VENDORED_SOURCES: readonly VendoredSource[] = Object.freeze([
|
|
|
1085
922
|
/**
|
|
1086
923
|
* Adea-authored themes whose exact semantic values have no external palette to vendor.
|
|
1087
924
|
*
|
|
1088
|
-
*
|
|
1089
|
-
*
|
|
1090
|
-
* these hand-maintained semantic roles are the source, not a transcription of a
|
|
1091
|
-
* third-party palette. Their optional shadcn projection keeps distinctions (including
|
|
1092
|
-
* source-authored alpha) that the canonical opaque roles cannot represent.
|
|
925
|
+
* Their optional shadcn projection keeps distinctions (including source-authored
|
|
926
|
+
* alpha) that the canonical opaque roles cannot represent.
|
|
1093
927
|
*/
|
|
1094
928
|
export interface AuthoredSource {
|
|
1095
929
|
id: string
|
|
@@ -1134,10 +968,8 @@ export interface AuthoredSource {
|
|
|
1134
968
|
/**
|
|
1135
969
|
* The terminal palette.
|
|
1136
970
|
*
|
|
1137
|
-
* Adea ships a terminal, so
|
|
1138
|
-
* questions the same way an imported theme does.
|
|
1139
|
-
* already runs: the light set is GitHub's light scheme and the dark set GitHub's
|
|
1140
|
-
* dark, which is what the embedded terminal was drawn against.
|
|
971
|
+
* Adea ships a terminal, so an authored theme has to answer the sixteen ANSI
|
|
972
|
+
* questions the same way an imported theme does.
|
|
1141
973
|
*/
|
|
1142
974
|
ansi: {
|
|
1143
975
|
black: string
|
|
@@ -1163,7 +995,5 @@ export interface AuthoredSource {
|
|
|
1163
995
|
|
|
1164
996
|
export const AUTHORED_SOURCES: readonly AuthoredSource[] = Object.freeze([
|
|
1165
997
|
// Empty today. A theme lands here when Adea owns a palette that has no upstream
|
|
1166
|
-
// scheme to vendor
|
|
1167
|
-
// dropped in favour of GitHub's own High Contrast pair, which serve the same
|
|
1168
|
-
// accessibility rung without first-party maintenance.
|
|
998
|
+
// scheme to vendor.
|
|
1169
999
|
])
|