Dynamically load all themes listed under styles/src/themes/*.ts

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-05-17 16:08:14 +02:00
parent 8f88803695
commit 692be10b10
26 changed files with 1081 additions and 1127 deletions

531
styles/dist/dark.json vendored
View file

@ -1,531 +0,0 @@
{
"meta": {
"themeName": "cave-dark"
},
"text": {
"primary": {
"value": "#e2dfe7",
"type": "color"
},
"secondary": {
"value": "#8b8792",
"type": "color"
},
"muted": {
"value": "#8b8792",
"type": "color"
},
"placeholder": {
"value": "#7e7887",
"type": "color"
},
"active": {
"value": "#efecf4",
"type": "color"
},
"feature": {
"value": "#576ddb",
"type": "color"
},
"ok": {
"value": "#2a9292",
"type": "color"
},
"error": {
"value": "#be4678",
"type": "color"
},
"warning": {
"value": "#a06e3b",
"type": "color"
},
"info": {
"value": "#576ddb",
"type": "color"
}
},
"icon": {
"primary": {
"value": "#e2dfe7",
"type": "color"
},
"secondary": {
"value": "#8b8792",
"type": "color"
},
"muted": {
"value": "#8b8792",
"type": "color"
},
"placeholder": {
"value": "#7e7887",
"type": "color"
},
"active": {
"value": "#efecf4",
"type": "color"
},
"feature": {
"value": "#576ddb",
"type": "color"
},
"ok": {
"value": "#2a9292",
"type": "color"
},
"error": {
"value": "#be4678",
"type": "color"
},
"warning": {
"value": "#a06e3b",
"type": "color"
},
"info": {
"value": "#576ddb",
"type": "color"
}
},
"background": {
"100": {
"base": {
"value": "#26232a",
"type": "color"
},
"hovered": {
"value": "#5852603d",
"type": "color"
},
"active": {
"value": "#5852605c",
"type": "color"
}
},
"300": {
"base": {
"value": "#26232a",
"type": "color"
},
"hovered": {
"value": "#5852603d",
"type": "color"
},
"active": {
"value": "#5852605c",
"type": "color"
}
},
"500": {
"base": {
"value": "#19171c",
"type": "color"
},
"hovered": {
"value": "#26232a3d",
"type": "color"
},
"active": {
"value": "#26232a5c",
"type": "color"
}
},
"on300": {
"base": {
"value": "#19171c",
"type": "color"
},
"hovered": {
"value": "#26232a3d",
"type": "color"
},
"active": {
"value": "#26232a7a",
"type": "color"
}
},
"on500": {
"base": {
"value": "#26232a",
"type": "color"
},
"hovered": {
"value": "#5852603d",
"type": "color"
},
"active": {
"value": "#5852607a",
"type": "color"
}
},
"ok": {
"base": {
"value": "#2a929226",
"type": "color"
},
"hovered": {
"value": "#2a929233",
"type": "color"
},
"active": {
"value": "#2a929240",
"type": "color"
}
},
"error": {
"base": {
"value": "#be467826",
"type": "color"
},
"hovered": {
"value": "#be467833",
"type": "color"
},
"active": {
"value": "#be467840",
"type": "color"
}
},
"warning": {
"base": {
"value": "#a06e3b26",
"type": "color"
},
"hovered": {
"value": "#a06e3b33",
"type": "color"
},
"active": {
"value": "#a06e3b40",
"type": "color"
}
},
"info": {
"base": {
"value": "#576ddb26",
"type": "color"
},
"hovered": {
"value": "#576ddb33",
"type": "color"
},
"active": {
"value": "#576ddb40",
"type": "color"
}
}
},
"border": {
"primary": {
"value": "#19171c",
"type": "color"
},
"secondary": {
"value": "#26232a",
"type": "color"
},
"muted": {
"value": "#655f6d",
"type": "color"
},
"active": {
"value": "#655f6d",
"type": "color"
},
"onMedia": {
"value": "#19171c1a",
"type": "color"
},
"ok": {
"value": "#2a929226",
"type": "color"
},
"error": {
"value": "#be467826",
"type": "color"
},
"warning": {
"value": "#a06e3b26",
"type": "color"
},
"info": {
"value": "#576ddb26",
"type": "color"
}
},
"editor": {
"background": {
"value": "#19171c",
"type": "color"
},
"indent_guide": {
"value": "#655f6d",
"type": "color"
},
"indent_guide_active": {
"value": "#26232a",
"type": "color"
},
"line": {
"active": {
"value": "#efecf412",
"type": "color"
},
"highlighted": {
"value": "#efecf41f",
"type": "color"
},
"inserted": {
"value": "#2a929240",
"type": "color"
},
"deleted": {
"value": "#be467840",
"type": "color"
},
"modified": {
"value": "#576ddb40",
"type": "color"
}
},
"highlight": {
"selection": {
"value": "#576ddb3d",
"type": "color"
},
"occurrence": {
"value": "#efecf41f",
"type": "color"
},
"activeOccurrence": {
"value": "#efecf43d",
"type": "color"
},
"matchingBracket": {
"value": "#26232a5c",
"type": "color"
},
"match": {
"value": "#955ae77a",
"type": "color"
},
"activeMatch": {
"value": "#955ae7b8",
"type": "color"
},
"related": {
"value": "#26232a3d",
"type": "color"
}
},
"gutter": {
"primary": {
"value": "#7e7887",
"type": "color"
},
"active": {
"value": "#efecf4",
"type": "color"
}
}
},
"syntax": {
"primary": {
"value": "#efecf4",
"type": "color"
},
"comment": {
"value": "#8b8792",
"type": "color"
},
"keyword": {
"value": "#576ddb",
"type": "color"
},
"function": {
"value": "#a06e3b",
"type": "color"
},
"type": {
"value": "#398bc6",
"type": "color"
},
"variant": {
"value": "#576ddb",
"type": "color"
},
"property": {
"value": "#576ddb",
"type": "color"
},
"enum": {
"value": "#aa573c",
"type": "color"
},
"operator": {
"value": "#aa573c",
"type": "color"
},
"string": {
"value": "#aa573c",
"type": "color"
},
"number": {
"value": "#2a9292",
"type": "color"
},
"boolean": {
"value": "#2a9292",
"type": "color"
}
},
"player": {
"1": {
"baseColor": {
"value": "#576ddb",
"type": "color"
},
"cursorColor": {
"value": "#576ddb",
"type": "color"
},
"selectionColor": {
"value": "#576ddb3d",
"type": "color"
},
"borderColor": {
"value": "#576ddbcc",
"type": "color"
}
},
"2": {
"baseColor": {
"value": "#2a9292",
"type": "color"
},
"cursorColor": {
"value": "#2a9292",
"type": "color"
},
"selectionColor": {
"value": "#2a92923d",
"type": "color"
},
"borderColor": {
"value": "#2a9292cc",
"type": "color"
}
},
"3": {
"baseColor": {
"value": "#bf40bf",
"type": "color"
},
"cursorColor": {
"value": "#bf40bf",
"type": "color"
},
"selectionColor": {
"value": "#bf40bf3d",
"type": "color"
},
"borderColor": {
"value": "#bf40bfcc",
"type": "color"
}
},
"4": {
"baseColor": {
"value": "#aa573c",
"type": "color"
},
"cursorColor": {
"value": "#aa573c",
"type": "color"
},
"selectionColor": {
"value": "#aa573c3d",
"type": "color"
},
"borderColor": {
"value": "#aa573ccc",
"type": "color"
}
},
"5": {
"baseColor": {
"value": "#955ae7",
"type": "color"
},
"cursorColor": {
"value": "#955ae7",
"type": "color"
},
"selectionColor": {
"value": "#955ae73d",
"type": "color"
},
"borderColor": {
"value": "#955ae7cc",
"type": "color"
}
},
"6": {
"baseColor": {
"value": "#398bc6",
"type": "color"
},
"cursorColor": {
"value": "#398bc6",
"type": "color"
},
"selectionColor": {
"value": "#398bc63d",
"type": "color"
},
"borderColor": {
"value": "#398bc6cc",
"type": "color"
}
},
"7": {
"baseColor": {
"value": "#be4678",
"type": "color"
},
"cursorColor": {
"value": "#be4678",
"type": "color"
},
"selectionColor": {
"value": "#be46783d",
"type": "color"
},
"borderColor": {
"value": "#be4678cc",
"type": "color"
}
},
"8": {
"baseColor": {
"value": "#a06e3b",
"type": "color"
},
"cursorColor": {
"value": "#a06e3b",
"type": "color"
},
"selectionColor": {
"value": "#a06e3b3d",
"type": "color"
},
"borderColor": {
"value": "#a06e3bcc",
"type": "color"
}
}
},
"shadowAlpha": {
"value": 0.24,
"type": "number"
}
}

531
styles/dist/light.json vendored
View file

@ -1,531 +0,0 @@
{
"meta": {
"themeName": "cave-light"
},
"text": {
"primary": {
"value": "#26232a",
"type": "color"
},
"secondary": {
"value": "#585260",
"type": "color"
},
"muted": {
"value": "#585260",
"type": "color"
},
"placeholder": {
"value": "#655f6d",
"type": "color"
},
"active": {
"value": "#19171c",
"type": "color"
},
"feature": {
"value": "#576ddb",
"type": "color"
},
"ok": {
"value": "#2a9292",
"type": "color"
},
"error": {
"value": "#be4678",
"type": "color"
},
"warning": {
"value": "#a06e3b",
"type": "color"
},
"info": {
"value": "#576ddb",
"type": "color"
}
},
"icon": {
"primary": {
"value": "#26232a",
"type": "color"
},
"secondary": {
"value": "#585260",
"type": "color"
},
"muted": {
"value": "#585260",
"type": "color"
},
"placeholder": {
"value": "#655f6d",
"type": "color"
},
"active": {
"value": "#19171c",
"type": "color"
},
"feature": {
"value": "#576ddb",
"type": "color"
},
"ok": {
"value": "#2a9292",
"type": "color"
},
"error": {
"value": "#be4678",
"type": "color"
},
"warning": {
"value": "#a06e3b",
"type": "color"
},
"info": {
"value": "#576ddb",
"type": "color"
}
},
"background": {
"100": {
"base": {
"value": "#e2dfe7",
"type": "color"
},
"hovered": {
"value": "#8b87921f",
"type": "color"
},
"active": {
"value": "#8b87922e",
"type": "color"
}
},
"300": {
"base": {
"value": "#e2dfe7",
"type": "color"
},
"hovered": {
"value": "#8b87921f",
"type": "color"
},
"active": {
"value": "#8b87922e",
"type": "color"
}
},
"500": {
"base": {
"value": "#efecf4",
"type": "color"
},
"hovered": {
"value": "#e2dfe71f",
"type": "color"
},
"active": {
"value": "#e2dfe72e",
"type": "color"
}
},
"on300": {
"base": {
"value": "#efecf4",
"type": "color"
},
"hovered": {
"value": "#e2dfe71f",
"type": "color"
},
"active": {
"value": "#e2dfe73d",
"type": "color"
}
},
"on500": {
"base": {
"value": "#e2dfe7",
"type": "color"
},
"hovered": {
"value": "#8b87921f",
"type": "color"
},
"active": {
"value": "#8b87923d",
"type": "color"
}
},
"ok": {
"base": {
"value": "#2a929226",
"type": "color"
},
"hovered": {
"value": "#2a929233",
"type": "color"
},
"active": {
"value": "#2a929240",
"type": "color"
}
},
"error": {
"base": {
"value": "#be467826",
"type": "color"
},
"hovered": {
"value": "#be467833",
"type": "color"
},
"active": {
"value": "#be467840",
"type": "color"
}
},
"warning": {
"base": {
"value": "#a06e3b26",
"type": "color"
},
"hovered": {
"value": "#a06e3b33",
"type": "color"
},
"active": {
"value": "#a06e3b40",
"type": "color"
}
},
"info": {
"base": {
"value": "#576ddb26",
"type": "color"
},
"hovered": {
"value": "#576ddb33",
"type": "color"
},
"active": {
"value": "#576ddb40",
"type": "color"
}
}
},
"border": {
"primary": {
"value": "#efecf4",
"type": "color"
},
"secondary": {
"value": "#e2dfe7",
"type": "color"
},
"muted": {
"value": "#7e7887",
"type": "color"
},
"active": {
"value": "#7e7887",
"type": "color"
},
"onMedia": {
"value": "#efecf41a",
"type": "color"
},
"ok": {
"value": "#2a929226",
"type": "color"
},
"error": {
"value": "#be467826",
"type": "color"
},
"warning": {
"value": "#a06e3b26",
"type": "color"
},
"info": {
"value": "#576ddb26",
"type": "color"
}
},
"editor": {
"background": {
"value": "#efecf4",
"type": "color"
},
"indent_guide": {
"value": "#7e7887",
"type": "color"
},
"indent_guide_active": {
"value": "#e2dfe7",
"type": "color"
},
"line": {
"active": {
"value": "#19171c12",
"type": "color"
},
"highlighted": {
"value": "#19171c1f",
"type": "color"
},
"inserted": {
"value": "#2a929240",
"type": "color"
},
"deleted": {
"value": "#be467840",
"type": "color"
},
"modified": {
"value": "#576ddb40",
"type": "color"
}
},
"highlight": {
"selection": {
"value": "#576ddb3d",
"type": "color"
},
"occurrence": {
"value": "#19171c0f",
"type": "color"
},
"activeOccurrence": {
"value": "#19171c1f",
"type": "color"
},
"matchingBracket": {
"value": "#e2dfe72e",
"type": "color"
},
"match": {
"value": "#955ae73d",
"type": "color"
},
"activeMatch": {
"value": "#955ae75c",
"type": "color"
},
"related": {
"value": "#e2dfe71f",
"type": "color"
}
},
"gutter": {
"primary": {
"value": "#655f6d",
"type": "color"
},
"active": {
"value": "#19171c",
"type": "color"
}
}
},
"syntax": {
"primary": {
"value": "#19171c",
"type": "color"
},
"comment": {
"value": "#585260",
"type": "color"
},
"keyword": {
"value": "#576ddb",
"type": "color"
},
"function": {
"value": "#a06e3b",
"type": "color"
},
"type": {
"value": "#398bc6",
"type": "color"
},
"variant": {
"value": "#576ddb",
"type": "color"
},
"property": {
"value": "#576ddb",
"type": "color"
},
"enum": {
"value": "#aa573c",
"type": "color"
},
"operator": {
"value": "#aa573c",
"type": "color"
},
"string": {
"value": "#aa573c",
"type": "color"
},
"number": {
"value": "#2a9292",
"type": "color"
},
"boolean": {
"value": "#2a9292",
"type": "color"
}
},
"player": {
"1": {
"baseColor": {
"value": "#576ddb",
"type": "color"
},
"cursorColor": {
"value": "#576ddb",
"type": "color"
},
"selectionColor": {
"value": "#576ddb3d",
"type": "color"
},
"borderColor": {
"value": "#576ddbcc",
"type": "color"
}
},
"2": {
"baseColor": {
"value": "#2a9292",
"type": "color"
},
"cursorColor": {
"value": "#2a9292",
"type": "color"
},
"selectionColor": {
"value": "#2a92923d",
"type": "color"
},
"borderColor": {
"value": "#2a9292cc",
"type": "color"
}
},
"3": {
"baseColor": {
"value": "#bf40bf",
"type": "color"
},
"cursorColor": {
"value": "#bf40bf",
"type": "color"
},
"selectionColor": {
"value": "#bf40bf3d",
"type": "color"
},
"borderColor": {
"value": "#bf40bfcc",
"type": "color"
}
},
"4": {
"baseColor": {
"value": "#aa573c",
"type": "color"
},
"cursorColor": {
"value": "#aa573c",
"type": "color"
},
"selectionColor": {
"value": "#aa573c3d",
"type": "color"
},
"borderColor": {
"value": "#aa573ccc",
"type": "color"
}
},
"5": {
"baseColor": {
"value": "#955ae7",
"type": "color"
},
"cursorColor": {
"value": "#955ae7",
"type": "color"
},
"selectionColor": {
"value": "#955ae73d",
"type": "color"
},
"borderColor": {
"value": "#955ae7cc",
"type": "color"
}
},
"6": {
"baseColor": {
"value": "#398bc6",
"type": "color"
},
"cursorColor": {
"value": "#398bc6",
"type": "color"
},
"selectionColor": {
"value": "#398bc63d",
"type": "color"
},
"borderColor": {
"value": "#398bc6cc",
"type": "color"
}
},
"7": {
"baseColor": {
"value": "#be4678",
"type": "color"
},
"cursorColor": {
"value": "#be4678",
"type": "color"
},
"selectionColor": {
"value": "#be46783d",
"type": "color"
},
"borderColor": {
"value": "#be4678cc",
"type": "color"
}
},
"8": {
"baseColor": {
"value": "#a06e3b",
"type": "color"
},
"cursorColor": {
"value": "#a06e3b",
"type": "color"
},
"selectionColor": {
"value": "#a06e3b3d",
"type": "color"
},
"borderColor": {
"value": "#a06e3bcc",
"type": "color"
}
}
},
"shadowAlpha": {
"value": 0.12,
"type": "number"
}
}

1038
styles/dist/tokens.json vendored

File diff suppressed because it is too large Load diff

View file

@ -1,17 +1,9 @@
import * as fs from "fs";
import * as path from "path";
import app from "./styleTree/app";
import { dark as caveDark, light as caveLight } from "./themes/cave";
import { dark as solarizedDark, light as solarizedLight } from "./themes/solarized";
import { dark as sulphurpoolDark, light as sulphurpoolLight } from "./themes/sulphurpool";
import themes from "./themes";
import snakeCase from "./utils/snakeCase";
const themes = [
caveDark, caveLight,
solarizedDark, solarizedLight,
sulphurpoolDark, sulphurpoolLight
];
const themeDirectory = `${__dirname}/../../assets/themes/`;
// Clear existing themes

View file

@ -1,9 +1,7 @@
import * as fs from "fs";
import * as path from "path";
import { light as solarizedLight, dark as solarizedDark } from "./themes/solarized";
// Use cave as "light" and "dark" themes
import { light, dark } from "./themes/cave";
import Theme from "./themes/theme";
import themes from "./themes";
import Theme from "./themes/common/theme";
import { colors, fontFamilies, fontSizes, fontWeights, sizes } from "./tokens";
// Organize theme tokens
@ -50,6 +48,9 @@ const coreTokens = {
const combinedTokens: any = {};
const distPath = path.resolve(`${__dirname}/../dist`);
for (const file of fs.readdirSync(distPath)) {
fs.unlinkSync(path.join(distPath, file));
}
// Add core tokens to the combined tokens and write `core.json`.
// We write `core.json` as a separate file for the design team's convenience, but it isn't consumed by Figma Tokens directly.
@ -60,7 +61,6 @@ combinedTokens.core = coreTokens;
// Add each theme to the combined tokens and write ${theme}.json.
// We write `${theme}.json` as a separate file for the design team's convenience, but it isn't consumed by Figma Tokens directly.
let themes = [dark, light, solarizedDark, solarizedLight];
themes.forEach((theme) => {
const themePath = `${distPath}/${theme.name}.json`
fs.writeFileSync(themePath, JSON.stringify(themeTokens(theme), null, 2));

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import chatPanel from "./chatPanel";
import { text } from "./components";
import contactFinder from "./contactFinder";

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import { panel } from "./app";
import {
backgroundColor,

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import { text, backgroundColor, border } from "./components";
export default function commandPalette(theme: Theme) {

View file

@ -1,5 +1,5 @@
import chroma from "chroma-js";
import Theme, { BackgroundColorSet } from "../themes/theme";
import Theme, { BackgroundColorSet } from "../themes/common/theme";
import { fontFamilies, fontSizes, FontWeight } from "../tokens";
import { Color } from "../utils/color";

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import picker from "./picker";
import { backgroundColor, iconColor } from "./components";

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import { backgroundColor, iconColor, text } from "./components";
const avatarSize = 12;

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import { panel } from "./app";
import { backgroundColor, border, borderColor, iconColor, player, text } from "./components";

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import {
backgroundColor,
border,

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import { backgroundColor, border, player, shadow, text } from "./components";
export default function picker(theme: Theme) {

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import {
backgroundColor,
text,

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import { panel } from "./app";
import { backgroundColor, iconColor, player, text } from "./components";

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import { backgroundColor, border, player, text } from "./components";
export default function search(theme: Theme) {

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import { backgroundColor, border, iconColor, text } from "./components";
import { workspaceBackground } from "./workspace";

View file

@ -1,4 +1,4 @@
import Theme from "../themes/theme";
import Theme from "../themes/common/theme";
import { backgroundColor, border, iconColor, shadow, text } from "./components";
import statusBar from "./statusBar";

16
styles/src/themes.ts Normal file
View file

@ -0,0 +1,16 @@
import fs from "fs";
import path from "path";
import Theme from "./themes/common/theme";
const themes: Theme[] = [];
export default themes;
const themesPath = path.resolve(`${__dirname}/themes`);
for (const fileName of fs.readdirSync(themesPath)) {
const filePath = path.join(themesPath, fileName);
if (fs.statSync(filePath).isFile()) {
const theme = require(filePath);
themes.push(theme.dark);
themes.push(theme.light);
}
}

View file

@ -1,5 +1,5 @@
import chroma from "chroma-js";
import { colorRamp, createTheme } from "./base16";
import { colorRamp, createTheme } from "./common/base16";
const name = "cave";

View file

@ -1,7 +1,7 @@
import chroma from "chroma-js";
import { Scale, Color } from "chroma-js";
import { color, ColorToken, fontWeights, NumberToken } from "../tokens";
import { withOpacity } from "../utils/color";
import { color, ColorToken, fontWeights, NumberToken } from "../../tokens";
import { withOpacity } from "../../utils/color";
import Theme, { buildPlayer, Syntax } from "./theme";
export function colorRamp(color: Color): Scale {

View file

@ -1,5 +1,5 @@
import { ColorToken, FontWeightToken, NumberToken } from "../tokens";
import { withOpacity } from "../utils/color";
import { ColorToken, FontWeightToken, NumberToken } from "../../tokens";
import { withOpacity } from "../../utils/color";
export interface SyntaxHighlightStyle {
color: ColorToken;

View file

@ -1,30 +0,0 @@
import chroma from "chroma-js";
import { createTheme } from "./base16";
const name = "cave";
const colors = {
"red": chroma("#be4678"),
"orange": chroma("#aa573c"),
"yellow": chroma("#a06e3b"),
"green": chroma("#2a9292"),
"cyan": chroma("#398bc6"),
"blue": chroma("#576ddb"),
"violet": chroma("#955ae7"),
"magenta": chroma("#bf40bf"),
};
const ramps = {
neutral: chroma.scale(["#19171c", "#26232a", "#585260", "#655f6d", "#7e7887", "#8b8792", "#e2dfe7", "#efecf4"]),
red: chroma.scale([colors.red.darken(3), colors.red, colors.red.brighten(3)]),
orange: chroma.scale([colors.orange.darken(3), colors.orange, colors.orange.brighten(3)]),
yellow: chroma.scale([colors.yellow.darken(3), colors.yellow, colors.yellow.brighten(3)]),
green: chroma.scale([colors.green.darken(3), colors.green, colors.green.brighten(3)]),
cyan: chroma.scale([colors.cyan.darken(3), colors.cyan, colors.cyan.brighten(3)]),
blue: chroma.scale([colors.blue.darken(3), colors.blue, colors.blue.brighten(3)]),
violet: chroma.scale([colors.violet.darken(3), colors.violet, colors.violet.brighten(3)]),
magenta: chroma.scale([colors.magenta.darken(3), colors.magenta, colors.magenta.brighten(3)]),
}
export const dark = createTheme(`${name}-dark`, false, ramps);
export const light = createTheme(`${name}-light`, true, ramps);

View file

@ -1,5 +1,5 @@
import chroma from "chroma-js";
import { colorRamp, createTheme } from "./base16";
import { colorRamp, createTheme } from "./common/base16";
const name = "solarized";

View file

@ -1,5 +1,5 @@
import chroma from "chroma-js";
import { colorRamp, createTheme } from "./base16";
import { colorRamp, createTheme } from "./common/base16";
const name = "sulphurpool";