Six more palettes, taking the picker to twelve
Catppuccin, Solarized, Ayu, Kanagawa, Everforest and Primer, each with the light and dark variant its own project publishes: Latte and Mocha, Lotus and Wave, and so on. Values were fetched from each project's own repository and recorded in .palette-sources/palettes-upstream.md, with the two tiers no project publishes marked derived rather than passed off as upstream. Four candidates were rejected rather than adapted. Nord and Synthwave '84 publish no light variant, and inventing one is not porting a theme. Monokai is proprietary and its licence forbids redistribution. Material Theme has become a commercial product whose repository no longer publishes a palette at all. Body text is now lifted for contrast like every other text tone rather than exempted and merely checked. Most of these palettes target their own ~4.5:1 for body text where ihasmail asks 7:1, so the old rule would have rejected five of the six on a bar their designers never aimed at. Nudging the published colour along its own hue is what the script already does for muted text, links and accents, and every shift is printed in the generated CSS: Solarized light moves 4.13 to 7.07, Primer needed nothing at all. Primer is named for the design system, not for GitHub. The colour values are MIT; the name and the logo are trademarks, and NOTICE says plainly that nothing here is endorsed. The picker grid already wrapped on its own, so twelve cards needed no layout change.
This commit is contained in:
@@ -6,7 +6,10 @@ describe("the palettes themselves", () => {
|
||||
// The reason there is no "this palette is dark only" machinery: there is
|
||||
// no such palette. ihasmail's own gained a light half, and the override,
|
||||
// the toggle's memory and a greyed-out control all went with it.
|
||||
expect(PALETTES.map((p) => p.id)).toEqual(["default", "ihasmail", "dracula", "gruvbox", "rose-pine", "tokyo-night"]);
|
||||
expect(PALETTES.map((p) => p.id)).toEqual([
|
||||
"default", "ihasmail", "dracula", "gruvbox", "rose-pine", "tokyo-night",
|
||||
"catppuccin", "solarized", "ayu", "kanagawa", "everforest", "primer",
|
||||
]);
|
||||
});
|
||||
|
||||
it("credits every borrowed palette and neither of ihasmail's own", () => {
|
||||
|
||||
+16
-6
@@ -13,7 +13,9 @@
|
||||
* the derivation can be checked rather than taken on trust.
|
||||
*/
|
||||
|
||||
export type PaletteId = "default" | "ihasmail" | "dracula" | "gruvbox" | "rose-pine" | "tokyo-night";
|
||||
export type PaletteId =
|
||||
| "default" | "ihasmail" | "dracula" | "gruvbox" | "rose-pine" | "tokyo-night"
|
||||
| "catppuccin" | "solarized" | "ayu" | "kanagawa" | "everforest" | "primer";
|
||||
export type Mode = "system" | "light" | "dark";
|
||||
/** What a mode resolves to once the system has been asked. */
|
||||
export type ResolvedMode = "light" | "dark";
|
||||
@@ -26,11 +28,11 @@ export interface PaletteMeta {
|
||||
/**
|
||||
* Whether the name is a word rather than a name.
|
||||
*
|
||||
* Five of these six are proper names -- ihasmail, Dracula, Gruvbox, Rosé
|
||||
* Pine, Tokyo Night -- and are rendered translate="no" so a page translator
|
||||
* leaves them alone. "Classic" is not a name, it is an adjective describing
|
||||
* the theme, and a German reader should see "Klassisch". Reported by a
|
||||
* native speaker reviewing the German catalogue (#247).
|
||||
* All but one of these are proper names -- ihasmail, Dracula, Gruvbox and
|
||||
* the rest -- and are rendered translate="no" so a page translator leaves
|
||||
* them alone. "Classic" is not a name, it is an adjective describing the
|
||||
* theme, and a German reader should see "Klassisch". Reported by a native
|
||||
* speaker reviewing the German catalogue (#247).
|
||||
*/
|
||||
translatable?: boolean;
|
||||
}
|
||||
@@ -42,6 +44,14 @@ export const PALETTES: PaletteMeta[] = [
|
||||
{ id: "gruvbox", name: "Gruvbox", credit: "gruvbox by morhetz (MIT)" },
|
||||
{ id: "rose-pine", name: "Rosé Pine", credit: "Rosé Pine (MIT) — light variant is Dawn" },
|
||||
{ id: "tokyo-night", name: "Tokyo Night", credit: "Tokyo Night by enkia (MIT) — light variant is Day" },
|
||||
{ id: "catppuccin", name: "Catppuccin", credit: "Catppuccin (MIT) — dark is Mocha, light is Latte" },
|
||||
{ id: "solarized", name: "Solarized", credit: "Solarized by Ethan Schoonover (MIT) — light and dark are both original" },
|
||||
{ id: "ayu", name: "Ayu", credit: "Ayu by Konstantin Pschera (MIT)" },
|
||||
{ id: "kanagawa", name: "Kanagawa", credit: "Kanagawa by rebelot (MIT) — dark is Wave, light is Lotus" },
|
||||
{ id: "everforest", name: "Everforest", credit: "Everforest by sainnhe (MIT)" },
|
||||
// Named for the design system rather than for GitHub: the colours are MIT,
|
||||
// the name and the logo are trademarks, and nothing here is endorsed.
|
||||
{ id: "primer", name: "Primer", credit: "GitHub's Primer primitives (MIT); not affiliated with or endorsed by GitHub" },
|
||||
];
|
||||
|
||||
const byId = new Map(PALETTES.map((p) => [p.id, p]));
|
||||
|
||||
Reference in New Issue
Block a user