Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

feat: change themes to return ThemeConfig

Sergey Onufrienkod2b850134714
diff --git a/styles/src/themes/andromeda/andromeda.ts b/styles/src/themes/andromeda/andromeda.ts
index c8a075e7cb8..52c29bb2ec2 100644
--- a/styles/src/themes/andromeda/andromeda.ts
+++ b/styles/src/themes/andromeda/andromeda.ts
@@ -1,44 +1,39 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
+import {
+ chroma,
+ colorRamp,
+ ThemeAppearance,
+ ThemeLicenseType,
+ ThemeConfig,
+} from "../../common"
-const name = "Andromeda"
-
-const ramps = {
- neutral: chroma
- .scale([
- "#1E2025",
- "#23262E",
- "#292E38",
- "#2E323C",
- "#ACA8AE",
- "#CBC9CF",
- "#E1DDE4",
- "#F7F7F8",
- ])
- .domain([0, 0.15, 0.25, 0.35, 0.7, 0.8, 0.9, 1]),
- red: colorRamp(chroma("#F92672")),
- orange: colorRamp(chroma("#F39C12")),
- yellow: colorRamp(chroma("#FFE66D")),
- green: colorRamp(chroma("#96E072")),
- cyan: colorRamp(chroma("#00E8C6")),
- blue: colorRamp(chroma("#0CA793")),
- violet: colorRamp(chroma("#8A3FA6")),
- magenta: colorRamp(chroma("#C74DED")),
-}
-
-export const meta: Meta = {
- name,
+export const dark: ThemeConfig = {
+ name: "Andromeda",
author: "EliverLara",
- license: {
- SPDX: "MIT",
- },
- url: "https://github.com/EliverLara/Andromeda",
-}
-
-export const dark = createColorScheme({
- name: meta.name,
- author: meta.author,
appearance: ThemeAppearance.Dark,
- inputColor: ramps,
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl: "https://github.com/EliverLara/Andromeda",
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: {
+ neutral: chroma
+ .scale([
+ "#1E2025",
+ "#23262E",
+ "#292E38",
+ "#2E323C",
+ "#ACA8AE",
+ "#CBC9CF",
+ "#E1DDE4",
+ "#F7F7F8",
+ ])
+ .domain([0, 0.15, 0.25, 0.35, 0.7, 0.8, 0.9, 1]),
+ red: colorRamp(chroma("#F92672")),
+ orange: colorRamp(chroma("#F39C12")),
+ yellow: colorRamp(chroma("#FFE66D")),
+ green: colorRamp(chroma("#96E072")),
+ cyan: colorRamp(chroma("#00E8C6")),
+ blue: colorRamp(chroma("#0CA793")),
+ violet: colorRamp(chroma("#8A3FA6")),
+ magenta: colorRamp(chroma("#C74DED")),
+ },
override: { syntax: {} },
-})
+}
diff --git a/styles/src/themes/atelier/atelier-cave-dark.ts b/styles/src/themes/atelier/atelier-cave-dark.ts
index d6337de5bdd..ebec67b4c27 100644
--- a/styles/src/themes/atelier/atelier-cave-dark.ts
+++ b/styles/src/themes/atelier/atelier-cave-dark.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Cave Dark`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/",
- },
colors: {
base00: "#19171c",
base01: "#26232a",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Cave Dark`,
author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale([
colors.base00,
@@ -58,9 +55,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-cave-light.ts b/styles/src/themes/atelier/atelier-cave-light.ts
index 8769cd0359f..c1b7a05d471 100644
--- a/styles/src/themes/atelier/atelier-cave-light.ts
+++ b/styles/src/themes/atelier/atelier-cave-light.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Cave Light`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/",
- },
colors: {
base00: "#efecf4",
base01: "#e2dfe7",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Cave Light`,
author: meta.author,
appearance: ThemeAppearance.Light,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale(
[
@@ -60,9 +57,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-dune-dark.ts b/styles/src/themes/atelier/atelier-dune-dark.ts
index 534c174bf1b..c2ebc424e77 100644
--- a/styles/src/themes/atelier/atelier-dune-dark.ts
+++ b/styles/src/themes/atelier/atelier-dune-dark.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Dune Dark`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune/",
- },
colors: {
base00: "#20201d",
base01: "#292824",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Dune Dark`,
author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale([
colors.base00,
@@ -58,9 +55,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-dune-light.ts b/styles/src/themes/atelier/atelier-dune-light.ts
index 52bef3acfbf..01cb1d67cba 100644
--- a/styles/src/themes/atelier/atelier-dune-light.ts
+++ b/styles/src/themes/atelier/atelier-dune-light.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Dune Light`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune/",
- },
colors: {
base00: "#fefbec",
base01: "#e8e4cf",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Dune Light`,
author: meta.author,
appearance: ThemeAppearance.Light,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale(
[
@@ -60,9 +57,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-estuary-dark.ts b/styles/src/themes/atelier/atelier-estuary-dark.ts
index 550327df275..8e32c1f68f5 100644
--- a/styles/src/themes/atelier/atelier-estuary-dark.ts
+++ b/styles/src/themes/atelier/atelier-estuary-dark.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Estuary Dark`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary/",
- },
colors: {
base00: "#22221b",
base01: "#302f27",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Estuary Dark`,
author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale([
colors.base00,
@@ -58,9 +55,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-estuary-light.ts b/styles/src/themes/atelier/atelier-estuary-light.ts
index 0a2b7ccda1b..75fcb8e8302 100644
--- a/styles/src/themes/atelier/atelier-estuary-light.ts
+++ b/styles/src/themes/atelier/atelier-estuary-light.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Estuary Light`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary/",
- },
colors: {
base00: "#f4f3ec",
base01: "#e7e6df",
@@ -30,14 +24,17 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Estuary Light`,
author: meta.author,
appearance: ThemeAppearance.Light,
- inputColor:{
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: {
neutral: chroma.scale(
[
colors.base00,
@@ -59,10 +56,8 @@ const theme = (variant: Variant) => {
violet: colorRamp(chroma(colors.base0E)),
magenta: colorRamp(chroma(colors.base0F)),
},
- override: { syntax },}
- )
+ override: { syntax },
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-forest-dark.ts b/styles/src/themes/atelier/atelier-forest-dark.ts
index 5040e056032..7ee7ae4ab13 100644
--- a/styles/src/themes/atelier/atelier-forest-dark.ts
+++ b/styles/src/themes/atelier/atelier-forest-dark.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Forest Dark`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest/",
- },
colors: {
base00: "#1b1918",
base01: "#2c2421",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Forest Dark`,
author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale([
colors.base00,
@@ -58,9 +55,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-forest-light.ts b/styles/src/themes/atelier/atelier-forest-light.ts
index cc222e501f3..17d3b63d883 100644
--- a/styles/src/themes/atelier/atelier-forest-light.ts
+++ b/styles/src/themes/atelier/atelier-forest-light.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Forest Light`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest/",
- },
colors: {
base00: "#f1efee",
base01: "#e6e2e0",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Forest Light`,
author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale(
[
@@ -60,9 +57,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-heath-dark.ts b/styles/src/themes/atelier/atelier-heath-dark.ts
index 4caa5fb3414..11751367a3f 100644
--- a/styles/src/themes/atelier/atelier-heath-dark.ts
+++ b/styles/src/themes/atelier/atelier-heath-dark.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Heath Dark`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath/",
- },
colors: {
base00: "#1b181b",
base01: "#292329",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Heath Dark`,
author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale([
colors.base00,
@@ -58,9 +55,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-heath-light.ts b/styles/src/themes/atelier/atelier-heath-light.ts
index dc6231957ae..07f4a9b3cb3 100644
--- a/styles/src/themes/atelier/atelier-heath-light.ts
+++ b/styles/src/themes/atelier/atelier-heath-light.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Heath Light`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath/",
- },
colors: {
base00: "#f7f3f7",
base01: "#d8cad8",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Heath Light`,
author: meta.author,
appearance: ThemeAppearance.Light,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale(
[
@@ -60,9 +57,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-lakeside-dark.ts b/styles/src/themes/atelier/atelier-lakeside-dark.ts
index 5a1cdfc3a14..b1c98ddfdf2 100644
--- a/styles/src/themes/atelier/atelier-lakeside-dark.ts
+++ b/styles/src/themes/atelier/atelier-lakeside-dark.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Lakeside Dark`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/",
- },
colors: {
base00: "#161b1d",
base01: "#1f292e",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Lakeside Dark`,
author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale([
colors.base00,
@@ -58,9 +55,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-lakeside-light.ts b/styles/src/themes/atelier/atelier-lakeside-light.ts
index 764891fb1a0..d960444defa 100644
--- a/styles/src/themes/atelier/atelier-lakeside-light.ts
+++ b/styles/src/themes/atelier/atelier-lakeside-light.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Lakeside Light`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/",
- },
colors: {
base00: "#ebf8ff",
base01: "#c1e4f6",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Lakeside Light`,
author: meta.author,
appearance: ThemeAppearance.Light,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale(
[
@@ -60,9 +57,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-plateau-dark.ts b/styles/src/themes/atelier/atelier-plateau-dark.ts
index cc85940085a..74693b24fd3 100644
--- a/styles/src/themes/atelier/atelier-plateau-dark.ts
+++ b/styles/src/themes/atelier/atelier-plateau-dark.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Plateau Dark`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau/",
- },
colors: {
base00: "#1b1818",
base01: "#292424",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Plateau Dark`,
author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale([
colors.base00,
@@ -58,9 +55,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-plateau-light.ts b/styles/src/themes/atelier/atelier-plateau-light.ts
index 3c2b920ec3f..dd3130cea0d 100644
--- a/styles/src/themes/atelier/atelier-plateau-light.ts
+++ b/styles/src/themes/atelier/atelier-plateau-light.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Plateau Light`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau/",
- },
colors: {
base00: "#f4ecec",
base01: "#e7dfdf",
@@ -30,14 +24,17 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Plateau Light`,
author: meta.author,
appearance: ThemeAppearance.Light,
- inputColor:{
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: {
neutral: chroma.scale(
[
colors.base00,
@@ -59,10 +56,8 @@ const theme = (variant: Variant) => {
violet: colorRamp(chroma(colors.base0E)),
magenta: colorRamp(chroma(colors.base0F)),
},
- override: { syntax },}
- )
+ override: { syntax },
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-savanna-dark.ts b/styles/src/themes/atelier/atelier-savanna-dark.ts
index eecfbeb7ca7..c387ac5ae98 100644
--- a/styles/src/themes/atelier/atelier-savanna-dark.ts
+++ b/styles/src/themes/atelier/atelier-savanna-dark.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Savanna Dark`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna/",
- },
colors: {
base00: "#171c19",
base01: "#232a25",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Savanna Dark`,
author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale([
colors.base00,
@@ -58,9 +55,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-savanna-light.ts b/styles/src/themes/atelier/atelier-savanna-light.ts
index 62966116ff8..64edd406a89 100644
--- a/styles/src/themes/atelier/atelier-savanna-light.ts
+++ b/styles/src/themes/atelier/atelier-savanna-light.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Savanna Light`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna/",
- },
colors: {
base00: "#ecf4ee",
base01: "#dfe7e2",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Savanna Light`,
author: meta.author,
appearance: ThemeAppearance.Light,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale(
[
@@ -60,9 +57,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-seaside-dark.ts b/styles/src/themes/atelier/atelier-seaside-dark.ts
index 44ce425326c..dbccb96013c 100644
--- a/styles/src/themes/atelier/atelier-seaside-dark.ts
+++ b/styles/src/themes/atelier/atelier-seaside-dark.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Seaside Dark`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/",
- },
colors: {
base00: "#131513",
base01: "#242924",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Seaside Dark`,
author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale([
colors.base00,
@@ -58,9 +55,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-seaside-light.ts b/styles/src/themes/atelier/atelier-seaside-light.ts
index 0f0d830d22e..a9c034ed440 100644
--- a/styles/src/themes/atelier/atelier-seaside-light.ts
+++ b/styles/src/themes/atelier/atelier-seaside-light.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Seaside Light`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/",
- },
colors: {
base00: "#f4fbf4",
base01: "#cfe8cf",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Seaside Light`,
author: meta.author,
appearance: ThemeAppearance.Light,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale(
[
@@ -60,9 +57,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-sulphurpool-dark.ts b/styles/src/themes/atelier/atelier-sulphurpool-dark.ts
index 2ee6c1d9441..edfc518b8e9 100644
--- a/styles/src/themes/atelier/atelier-sulphurpool-dark.ts
+++ b/styles/src/themes/atelier/atelier-sulphurpool-dark.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Sulphurpool Dark`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool/",
- },
colors: {
base00: "#202746",
base01: "#293256",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Sulphurpool Dark`,
author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale([
colors.base00,
@@ -58,9 +55,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/atelier-sulphurpool-light.ts b/styles/src/themes/atelier/atelier-sulphurpool-light.ts
index a1af81e5d5b..fbef6683bf9 100644
--- a/styles/src/themes/atelier/atelier-sulphurpool-light.ts
+++ b/styles/src/themes/atelier/atelier-sulphurpool-light.ts
@@ -1,13 +1,7 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-import { metaCommon, name, buildSyntax, Variant } from "./common"
+import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
+import { meta, buildSyntax, Variant } from "./common"
const variant: Variant = {
- meta: {
- name: `${name} Sulphurpool Light`,
- ...metaCommon,
- url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool/",
- },
colors: {
base00: "#f5f7ff",
base01: "#dfe2f1",
@@ -30,13 +24,16 @@ const variant: Variant = {
const syntax = buildSyntax(variant)
-const theme = (variant: Variant) => {
- const { meta, colors } = variant
+const getTheme = (variant: Variant): ThemeConfig => {
+ const { colors } = variant
- return createColorScheme({
- name: meta.name,
+ return {
+ name: `${meta.name} Sulphurpool Light`,
author: meta.author,
appearance: ThemeAppearance.Light,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: {
neutral: chroma.scale(
[
@@ -60,9 +57,7 @@ const theme = (variant: Variant) => {
magenta: colorRamp(chroma(colors.base0F)),
},
override: { syntax },
- })
+ }
}
-export const dark = theme(variant)
-
-export const meta: Meta = variant.meta
+export const theme = getTheme(variant)
diff --git a/styles/src/themes/atelier/common.ts b/styles/src/themes/atelier/common.ts
index 065fc506c0a..961ca642701 100644
--- a/styles/src/themes/atelier/common.ts
+++ b/styles/src/themes/atelier/common.ts
@@ -1,7 +1,6 @@
-import { License, Meta, ThemeSyntax } from "../common"
+import { ThemeLicenseType, ThemeConfig, ThemeSyntax } from "../../common"
export interface Variant {
- meta: Meta
colors: {
base00: string
base01: string
@@ -22,14 +21,12 @@ export interface Variant {
}
}
-export const metaCommon: {
- author: string
- license: License
-} = {
+export const meta: Partial<ThemeConfig> = {
+ name: "Atelier",
author: "Bram de Haan (http://atelierbramdehaan.nl)",
- license: {
- SPDX: "MIT",
- },
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl:
+ "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/",
}
export const buildSyntax = (variant: Variant): ThemeSyntax => {
@@ -57,5 +54,3 @@ export const buildSyntax = (variant: Variant): ThemeSyntax => {
keyword: { color: colors.base0E },
}
}
-
-export const name = "Atelier"
diff --git a/styles/src/themes/ayu/ayu-dark.ts b/styles/src/themes/ayu/ayu-dark.ts
index c5d69bbae5b..7feddacd2b1 100644
--- a/styles/src/themes/ayu/ayu-dark.ts
+++ b/styles/src/themes/ayu/ayu-dark.ts
@@ -1,18 +1,16 @@
-import { createColorScheme, ThemeAppearance } from "../common"
-import { ayu, meta as themeMeta, buildTheme } from "./common"
-
-export const meta = {
- ...themeMeta,
- name: `${themeMeta.name} Dark`,
-}
+import { ThemeAppearance, ThemeConfig } from "../../common"
+import { ayu, meta, buildTheme } from "./common"
const variant = ayu.dark
-const theme = buildTheme(variant, false)
+const { ramps, syntax } = buildTheme(variant, false)
-export const dark = createColorScheme({
- name: meta.name,
+export const theme: ThemeConfig = {
+ name: `${meta.name} Dark`,
author: meta.author,
appearance: ThemeAppearance.Dark,
- inputColor: theme.ramps,
- override: { syntax: theme.syntax },
-})
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: ramps,
+ override: { syntax },
+}
diff --git a/styles/src/themes/ayu/ayu-light.ts b/styles/src/themes/ayu/ayu-light.ts
index 50bc71b74e9..bf023852471 100644
--- a/styles/src/themes/ayu/ayu-light.ts
+++ b/styles/src/themes/ayu/ayu-light.ts
@@ -1,18 +1,16 @@
-import { createColorScheme, ThemeAppearance } from "../common"
-import { ayu, meta as themeMeta, buildTheme } from "./common"
-
-export const meta = {
- ...themeMeta,
- name: `${themeMeta.name} Light`,
-}
+import { ThemeAppearance, ThemeConfig } from "../../common"
+import { ayu, meta, buildTheme } from "./common"
const variant = ayu.light
-const theme = buildTheme(variant, true)
+const { ramps, syntax } = buildTheme(variant, true)
-export const light = createColorScheme({
- name: meta.name,
+export const theme: ThemeConfig = {
+ name: `${meta.name} Light`,
author: meta.author,
appearance: ThemeAppearance.Light,
- inputColor: theme.ramps,
- override: { syntax: theme.syntax },
-})
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: ramps,
+ override: { syntax },
+}
diff --git a/styles/src/themes/ayu/ayu-mirage.ts b/styles/src/themes/ayu/ayu-mirage.ts
index 71d02d2a759..d2a69e7ab6a 100644
--- a/styles/src/themes/ayu/ayu-mirage.ts
+++ b/styles/src/themes/ayu/ayu-mirage.ts
@@ -1,18 +1,16 @@
-import { createColorScheme, ThemeAppearance } from "../common"
-import { ayu, meta as themeMeta, buildTheme } from "./common"
-
-export const meta = {
- ...themeMeta,
- name: `${themeMeta.name} Mirage`,
-}
+import { ThemeAppearance, ThemeConfig } from "../../common"
+import { ayu, meta, buildTheme } from "./common"
const variant = ayu.mirage
-const theme = buildTheme(variant, false)
+const { ramps, syntax } = buildTheme(variant, false)
-export const dark = createColorScheme({
- name: meta.name,
+export const theme: ThemeConfig = {
+ name: `${meta.name} Mirage`,
author: meta.author,
appearance: ThemeAppearance.Dark,
- inputColor: theme.ramps,
- override: { syntax: theme.syntax },
-})
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: ramps,
+ override: { syntax },
+}
diff --git a/styles/src/themes/ayu/common.ts b/styles/src/themes/ayu/common.ts
index e586e2d22d7..26e21c19105 100644
--- a/styles/src/themes/ayu/common.ts
+++ b/styles/src/themes/ayu/common.ts
@@ -1,8 +1,11 @@
import { dark, light, mirage } from "ayu"
-import { ThemeSyntax } from "../common/syntax"
-import chroma from "chroma-js"
-import { colorRamp } from "../common/ramps"
-import { Meta } from "../common/colorScheme"
+import {
+ chroma,
+ colorRamp,
+ ThemeLicenseType,
+ ThemeConfig,
+ ThemeSyntax,
+} from "../../common"
export const ayu = {
dark,
@@ -74,11 +77,9 @@ export const buildSyntax = (t: typeof dark): ThemeSyntax => {
}
}
-export const meta: Meta = {
+export const meta: Partial<ThemeConfig> = {
name: "Ayu",
author: "dempfi",
- license: {
- SPDX: "MIT",
- },
- url: "https://github.com/dempfi/ayu",
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl: "https://github.com/dempfi/ayu",
}
diff --git a/styles/src/themes/common/colorScheme.ts b/styles/src/themes/common/colorScheme.ts
index c32411f23db..d4ef2ae0132 100644
--- a/styles/src/themes/common/colorScheme.ts
+++ b/styles/src/themes/common/colorScheme.ts
@@ -25,11 +25,6 @@ export interface ColorScheme {
syntax?: Partial<ThemeSyntax>
}
-export interface MetaAndLicense {
- meta: Meta
- licenseFile: string
-}
-
export interface Meta {
name: string
author: string
diff --git a/styles/src/themes/common/syntax.ts b/styles/src/themes/common/syntax.ts
index 1645aaea873..258b845142c 100644
--- a/styles/src/themes/common/syntax.ts
+++ b/styles/src/themes/common/syntax.ts
@@ -117,7 +117,7 @@ export interface Syntax {
export type ThemeSyntax = Partial<Syntax>
const defaultSyntaxHighlightStyle: Omit<SyntaxHighlightStyle, "color"> = {
- weight: fontWeights.normal,
+ weight: "normal",
underline: false,
italic: false,
}
@@ -140,12 +140,14 @@ function buildDefaultSyntax(colorScheme: ColorScheme): Syntax {
// Mix the neutral and blue colors to get a
// predictive color distinct from any other color in the theme
- const predictive = chroma.mix(
- colorScheme.ramps.neutral(0.4).hex(),
- colorScheme.ramps.blue(0.4).hex(),
- 0.45,
- "lch"
- ).hex()
+ const predictive = chroma
+ .mix(
+ colorScheme.ramps.neutral(0.4).hex(),
+ colorScheme.ramps.blue(0.4).hex(),
+ 0.45,
+ "lch"
+ )
+ .hex()
const color = {
primary: colorScheme.ramps.neutral(1).hex(),
diff --git a/styles/src/themes/gruvbox/gruvbox-common.ts b/styles/src/themes/gruvbox/gruvbox-common.ts
index bad189600c0..f1c04a069c9 100644
--- a/styles/src/themes/gruvbox/gruvbox-common.ts
+++ b/styles/src/themes/gruvbox/gruvbox-common.ts
@@ -1,19 +1,17 @@
-import chroma from "chroma-js"
import {
- Meta,
+ chroma,
colorRamp,
- createColorScheme,
- ThemeSyntax,
ThemeAppearance,
-} from "../common"
+ ThemeLicenseType,
+ ThemeConfig,
+ ThemeSyntax,
+} from "../../common"
-export const meta: Meta = {
+const meta: Partial<ThemeConfig> = {
name: "Gruvbox",
- license: {
- SPDX: "MIT", // "MIT/X11"
- },
author: "morhetz <[email protected]>",
- url: "https://github.com/morhetz/gruvbox",
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl: "https://github.com/morhetz/gruvbox",
}
const color = {
@@ -168,7 +166,7 @@ const variant: Variant[] = [
},
]
-const buildVariant = (variant: Variant) => {
+const buildVariant = (variant: Variant): ThemeConfig => {
const { colors } = variant
const name = `Gruvbox ${variant.name}`
@@ -245,13 +243,16 @@ const buildVariant = (variant: Variant) => {
title: { color: colors.green },
}
- return createColorScheme({
+ return {
name,
author: meta.author,
appearance: variant.appearance as ThemeAppearance,
+ licenseType: meta.licenseType,
+ licenseUrl: meta.licenseUrl,
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: ramps,
override: { syntax },
- })
+ }
}
// Variants
diff --git a/styles/src/themes/gruvbox/gruvbox-dark-hard.ts b/styles/src/themes/gruvbox/gruvbox-dark-hard.ts
index 3723de49015..4102671189e 100644
--- a/styles/src/themes/gruvbox/gruvbox-dark-hard.ts
+++ b/styles/src/themes/gruvbox/gruvbox-dark-hard.ts
@@ -1,6 +1 @@
-import { darkHard as dark, meta as commonMeta } from "./gruvbox-common"
-
-let meta = { ...commonMeta }
-meta.name = `${commonMeta.name} Dark Hard`
-
-export { dark, meta }
+export { darkHard } from "./gruvbox-common"
diff --git a/styles/src/themes/gruvbox/gruvbox-dark-soft.ts b/styles/src/themes/gruvbox/gruvbox-dark-soft.ts
index 2887572eadb..d550d63768d 100644
--- a/styles/src/themes/gruvbox/gruvbox-dark-soft.ts
+++ b/styles/src/themes/gruvbox/gruvbox-dark-soft.ts
@@ -1,6 +1 @@
-import { darkSoft as dark, meta as commonMeta } from "./gruvbox-common"
-
-let meta = { ...commonMeta }
-meta.name = `${commonMeta.name} Dark Soft`
-
-export { dark, meta }
+export { darkSoft } from "./gruvbox-common"
diff --git a/styles/src/themes/gruvbox/gruvbox-dark.ts b/styles/src/themes/gruvbox/gruvbox-dark.ts
index cff7bd8bf94..05850028a40 100644
--- a/styles/src/themes/gruvbox/gruvbox-dark.ts
+++ b/styles/src/themes/gruvbox/gruvbox-dark.ts
@@ -1,6 +1 @@
-import { darkDefault as dark, meta as commonMeta } from "./gruvbox-common"
-
-let meta = { ...commonMeta }
-meta.name = `${commonMeta.name} Dark`
-
-export { dark, meta }
+export { darkDefault } from "./gruvbox-common"
diff --git a/styles/src/themes/gruvbox/gruvbox-light-hard.ts b/styles/src/themes/gruvbox/gruvbox-light-hard.ts
index cf998ce588b..ec3cddec758 100644
--- a/styles/src/themes/gruvbox/gruvbox-light-hard.ts
+++ b/styles/src/themes/gruvbox/gruvbox-light-hard.ts
@@ -1,6 +1 @@
-import { lightHard as light, meta as commonMeta } from "./gruvbox-common"
-
-let meta = { ...commonMeta }
-meta.name = `${commonMeta.name} Dark Soft`
-
-export { light, meta }
+export { lightHard } from "./gruvbox-common"
diff --git a/styles/src/themes/gruvbox/gruvbox-light-soft.ts b/styles/src/themes/gruvbox/gruvbox-light-soft.ts
index 90ec82e965e..0888e847aca 100644
--- a/styles/src/themes/gruvbox/gruvbox-light-soft.ts
+++ b/styles/src/themes/gruvbox/gruvbox-light-soft.ts
@@ -1,6 +1 @@
-import { lightSoft as light, meta as commonMeta } from "./gruvbox-common"
-
-let meta = { ...commonMeta }
-meta.name = `${commonMeta.name} Light Soft`
-
-export { light, meta }
+export { lightSoft } from "./gruvbox-common"
diff --git a/styles/src/themes/gruvbox/gruvbox-light.ts b/styles/src/themes/gruvbox/gruvbox-light.ts
index e8f355cd114..6f53ce52996 100644
--- a/styles/src/themes/gruvbox/gruvbox-light.ts
+++ b/styles/src/themes/gruvbox/gruvbox-light.ts
@@ -1,6 +1 @@
-import { lightDefault as light, meta as commonMeta } from "./gruvbox-common"
-
-let meta = { ...commonMeta }
-meta.name = `${commonMeta.name} Light`
-
-export { light, meta }
+export { lightDefault } from "./gruvbox-common"
diff --git a/styles/src/themes/one/one-dark.ts b/styles/src/themes/one/one-dark.ts
index fe0d1a053fc..69a5bd55755 100644
--- a/styles/src/themes/one/one-dark.ts
+++ b/styles/src/themes/one/one-dark.ts
@@ -1,14 +1,11 @@
-import chroma from "chroma-js"
-import { fontWeights } from "../../common"
import {
- Meta,
+ chroma,
+ fontWeights,
colorRamp,
- createColorScheme,
- ThemeSyntax,
ThemeAppearance,
-} from "../common"
-
-const name = "One Dark"
+ ThemeLicenseType,
+ ThemeConfig,
+} from "../../common"
const color = {
white: "#ACB2BE",
@@ -23,68 +20,60 @@ const color = {
purple: "#B478CF",
}
-const ramps = {
- neutral: chroma
- .scale([
- "#282c34",
- "#353b45",
- "#3e4451",
- "#545862",
- "#565c64",
- "#abb2bf",
- "#b6bdca",
- "#c8ccd4",
- ])
- .domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]),
- red: colorRamp(chroma(color.red)),
- orange: colorRamp(chroma(color.orange)),
- yellow: colorRamp(chroma(color.yellow)),
- green: colorRamp(chroma(color.green)),
- cyan: colorRamp(chroma(color.teal)),
- blue: colorRamp(chroma(color.blue)),
- violet: colorRamp(chroma(color.purple)),
- magenta: colorRamp(chroma("#be5046")),
-}
-
-const syntax: ThemeSyntax = {
- boolean: { color: color.orange },
- comment: { color: color.grey },
- enum: { color: color.red },
- "emphasis.strong": { color: color.orange },
- function: { color: color.blue },
- keyword: { color: color.purple },
- linkText: { color: color.blue, italic: false },
- linkUri: { color: color.teal },
- number: { color: color.orange },
- constant: { color: color.yellow },
- operator: { color: color.teal },
- primary: { color: color.white },
- property: { color: color.red },
- punctuation: { color: color.white },
- "punctuation.list_marker": { color: color.red },
- "punctuation.special": { color: color.darkRed },
- string: { color: color.green },
- title: { color: color.red, weight: fontWeights.normal },
- "text.literal": { color: color.green },
- type: { color: color.teal },
- "variable.special": { color: color.orange },
- variant: { color: color.blue },
- constructor: { color: color.blue },
-}
-
-export const meta: Meta = {
- name,
+export const theme: ThemeConfig = {
+ name: "One Dark",
author: "simurai",
- license: {
- SPDX: "MIT",
+ appearance: ThemeAppearance.Dark,
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl: "https://github.com/atom/atom/tree/master/packages/one-dark-ui",
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: {
+ neutral: chroma
+ .scale([
+ "#282c34",
+ "#353b45",
+ "#3e4451",
+ "#545862",
+ "#565c64",
+ "#abb2bf",
+ "#b6bdca",
+ "#c8ccd4",
+ ])
+ .domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]),
+ red: colorRamp(chroma(color.red)),
+ orange: colorRamp(chroma(color.orange)),
+ yellow: colorRamp(chroma(color.yellow)),
+ green: colorRamp(chroma(color.green)),
+ cyan: colorRamp(chroma(color.teal)),
+ blue: colorRamp(chroma(color.blue)),
+ violet: colorRamp(chroma(color.purple)),
+ magenta: colorRamp(chroma("#be5046")),
+ },
+ override: {
+ syntax: {
+ boolean: { color: color.orange },
+ comment: { color: color.grey },
+ enum: { color: color.red },
+ "emphasis.strong": { color: color.orange },
+ function: { color: color.blue },
+ keyword: { color: color.purple },
+ linkText: { color: color.blue, italic: false },
+ linkUri: { color: color.teal },
+ number: { color: color.orange },
+ constant: { color: color.yellow },
+ operator: { color: color.teal },
+ primary: { color: color.white },
+ property: { color: color.red },
+ punctuation: { color: color.white },
+ "punctuation.list_marker": { color: color.red },
+ "punctuation.special": { color: color.darkRed },
+ string: { color: color.green },
+ title: { color: color.red, weight: fontWeights.normal },
+ "text.literal": { color: color.green },
+ type: { color: color.teal },
+ "variable.special": { color: color.orange },
+ variant: { color: color.blue },
+ constructor: { color: color.blue },
+ },
},
- url: "https://github.com/atom/atom/tree/master/packages/one-dark-ui",
}
-
-export const dark = createColorScheme({
- name: meta.name,
- author: meta.author,
- appearance: ThemeAppearance.Dark,
- inputColor: ramps,
- override: { syntax },
-})
diff --git a/styles/src/themes/one/one-light.ts b/styles/src/themes/one/one-light.ts
index ac9876ecb42..9123c8879d1 100644
--- a/styles/src/themes/one/one-light.ts
+++ b/styles/src/themes/one/one-light.ts
@@ -1,14 +1,11 @@
-import chroma from "chroma-js"
-import { fontWeights } from "../../common"
import {
- Meta,
+ chroma,
+ fontWeights,
colorRamp,
- createColorScheme,
- ThemeSyntax,
ThemeAppearance,
-} from "../common"
-
-const name = "One Light"
+ ThemeLicenseType,
+ ThemeConfig,
+} from "../../common"
const color = {
black: "#383A41",
@@ -24,66 +21,59 @@ const color = {
magenta: "#994EA6",
}
-const ramps = {
- neutral: chroma
- .scale([
- "#383A41",
- "#535456",
- "#696c77",
- "#9D9D9F",
- "#A9A9A9",
- "#DBDBDC",
- "#EAEAEB",
- "#FAFAFA",
- ])
- .domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]),
- red: colorRamp(chroma(color.red)),
- orange: colorRamp(chroma(color.orange)),
- yellow: colorRamp(chroma(color.yellow)),
- green: colorRamp(chroma(color.green)),
- cyan: colorRamp(chroma(color.teal)),
- blue: colorRamp(chroma(color.blue)),
- violet: colorRamp(chroma(color.purple)),
- magenta: colorRamp(chroma(color.magenta)),
-}
-
-const syntax: ThemeSyntax = {
- boolean: { color: color.orange },
- comment: { color: color.grey },
- enum: { color: color.red },
- "emphasis.strong": { color: color.orange },
- function: { color: color.blue },
- keyword: { color: color.purple },
- linkText: { color: color.blue },
- linkUri: { color: color.teal },
- number: { color: color.orange },
- operator: { color: color.teal },
- primary: { color: color.black },
- property: { color: color.red },
- punctuation: { color: color.black },
- "punctuation.list_marker": { color: color.red },
- "punctuation.special": { color: color.darkRed },
- string: { color: color.green },
- title: { color: color.red, weight: fontWeights.normal },
- "text.literal": { color: color.green },
- type: { color: color.teal },
- "variable.special": { color: color.orange },
- variant: { color: color.blue },
-}
-
-export const meta: Meta = {
- name,
+export const theme: ThemeConfig = {
+ name: "One Light",
author: "simurai",
- license: {
- SPDX: "MIT",
+ appearance: ThemeAppearance.Light,
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl:
+ "https://github.com/atom/atom/tree/master/packages/one-light-ui",
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: {
+ neutral: chroma
+ .scale([
+ "#383A41",
+ "#535456",
+ "#696c77",
+ "#9D9D9F",
+ "#A9A9A9",
+ "#DBDBDC",
+ "#EAEAEB",
+ "#FAFAFA",
+ ])
+ .domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]),
+ red: colorRamp(chroma(color.red)),
+ orange: colorRamp(chroma(color.orange)),
+ yellow: colorRamp(chroma(color.yellow)),
+ green: colorRamp(chroma(color.green)),
+ cyan: colorRamp(chroma(color.teal)),
+ blue: colorRamp(chroma(color.blue)),
+ violet: colorRamp(chroma(color.purple)),
+ magenta: colorRamp(chroma(color.magenta)),
+ },
+ override: {
+ syntax: {
+ boolean: { color: color.orange },
+ comment: { color: color.grey },
+ enum: { color: color.red },
+ "emphasis.strong": { color: color.orange },
+ function: { color: color.blue },
+ keyword: { color: color.purple },
+ linkText: { color: color.blue },
+ linkUri: { color: color.teal },
+ number: { color: color.orange },
+ operator: { color: color.teal },
+ primary: { color: color.black },
+ property: { color: color.red },
+ punctuation: { color: color.black },
+ "punctuation.list_marker": { color: color.red },
+ "punctuation.special": { color: color.darkRed },
+ string: { color: color.green },
+ title: { color: color.red, weight: fontWeights.normal },
+ "text.literal": { color: color.green },
+ type: { color: color.teal },
+ "variable.special": { color: color.orange },
+ variant: { color: color.blue },
+ },
},
- url: "https://github.com/atom/atom/tree/master/packages/one-light-ui",
}
-
-export const light = createColorScheme({
- name: meta.name,
- author: meta.author,
- appearance: ThemeAppearance.Light,
- inputColor: ramps,
- override: { syntax },
-})
diff --git a/styles/src/themes/rose-pine/rose-pine-dawn.ts b/styles/src/themes/rose-pine/rose-pine-dawn.ts
index e9296a67eee..a373ed378c0 100644
--- a/styles/src/themes/rose-pine/rose-pine-dawn.ts
+++ b/styles/src/themes/rose-pine/rose-pine-dawn.ts
@@ -1,44 +1,39 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
+import {
+ chroma,
+ colorRamp,
+ ThemeAppearance,
+ ThemeLicenseType,
+ ThemeConfig,
+} from "../../common"
-const name = "Rosé Pine Dawn"
-
-const ramps = {
- neutral: chroma
- .scale([
- "#575279",
- "#797593",
- "#9893A5",
- "#B5AFB8",
- "#D3CCCC",
- "#F2E9E1",
- "#FFFAF3",
- "#FAF4ED",
- ])
- .domain([0, 0.35, 0.45, 0.65, 0.7, 0.8, 0.9, 1]),
- red: colorRamp(chroma("#B4637A")),
- orange: colorRamp(chroma("#D7827E")),
- yellow: colorRamp(chroma("#EA9D34")),
- green: colorRamp(chroma("#679967")),
- cyan: colorRamp(chroma("#286983")),
- blue: colorRamp(chroma("#56949F")),
- violet: colorRamp(chroma("#907AA9")),
- magenta: colorRamp(chroma("#79549F")),
-}
-
-export const meta: Meta = {
- name,
+export const theme: ThemeConfig = {
+ name: "Rosé Pine Dawn",
author: "edunfelt",
- license: {
- SPDX: "MIT",
- },
- url: "https://github.com/edunfelt/base16-rose-pine-scheme",
-}
-
-export const light = createColorScheme({
- name: meta.name,
- author: meta.author,
appearance: ThemeAppearance.Light,
- inputColor: ramps,
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl: "https://github.com/edunfelt/base16-rose-pine-scheme",
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: {
+ neutral: chroma
+ .scale([
+ "#575279",
+ "#797593",
+ "#9893A5",
+ "#B5AFB8",
+ "#D3CCCC",
+ "#F2E9E1",
+ "#FFFAF3",
+ "#FAF4ED",
+ ])
+ .domain([0, 0.35, 0.45, 0.65, 0.7, 0.8, 0.9, 1]),
+ red: colorRamp(chroma("#B4637A")),
+ orange: colorRamp(chroma("#D7827E")),
+ yellow: colorRamp(chroma("#EA9D34")),
+ green: colorRamp(chroma("#679967")),
+ cyan: colorRamp(chroma("#286983")),
+ blue: colorRamp(chroma("#56949F")),
+ violet: colorRamp(chroma("#907AA9")),
+ magenta: colorRamp(chroma("#79549F")),
+ },
override: { syntax: {} },
-})
+}
diff --git a/styles/src/themes/rose-pine/rose-pine-moon.ts b/styles/src/themes/rose-pine/rose-pine-moon.ts
index deef789960a..94b8166cb30 100644
--- a/styles/src/themes/rose-pine/rose-pine-moon.ts
+++ b/styles/src/themes/rose-pine/rose-pine-moon.ts
@@ -1,44 +1,39 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
+import {
+ chroma,
+ colorRamp,
+ ThemeAppearance,
+ ThemeLicenseType,
+ ThemeConfig,
+} from "../../common"
-const name = "Rosé Pine Moon"
-
-const ramps = {
- neutral: chroma
- .scale([
- "#232136",
- "#2A273F",
- "#393552",
- "#3E3A53",
- "#56526C",
- "#6E6A86",
- "#908CAA",
- "#E0DEF4",
- ])
- .domain([0, 0.3, 0.55, 1]),
- red: colorRamp(chroma("#EB6F92")),
- orange: colorRamp(chroma("#EBBCBA")),
- yellow: colorRamp(chroma("#F6C177")),
- green: colorRamp(chroma("#8DBD8D")),
- cyan: colorRamp(chroma("#409BBE")),
- blue: colorRamp(chroma("#9CCFD8")),
- violet: colorRamp(chroma("#C4A7E7")),
- magenta: colorRamp(chroma("#AB6FE9")),
-}
-
-export const meta: Meta = {
- name,
+export const theme: ThemeConfig = {
+ name: "Rosé Pine Moon",
author: "edunfelt",
- license: {
- SPDX: "MIT",
- },
- url: "https://github.com/edunfelt/base16-rose-pine-scheme",
-}
-
-export const dark = createColorScheme({
- name: meta.name,
- author: meta.author,
appearance: ThemeAppearance.Dark,
- inputColor: ramps,
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl: "https://github.com/edunfelt/base16-rose-pine-scheme",
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: {
+ neutral: chroma
+ .scale([
+ "#232136",
+ "#2A273F",
+ "#393552",
+ "#3E3A53",
+ "#56526C",
+ "#6E6A86",
+ "#908CAA",
+ "#E0DEF4",
+ ])
+ .domain([0, 0.3, 0.55, 1]),
+ red: colorRamp(chroma("#EB6F92")),
+ orange: colorRamp(chroma("#EBBCBA")),
+ yellow: colorRamp(chroma("#F6C177")),
+ green: colorRamp(chroma("#8DBD8D")),
+ cyan: colorRamp(chroma("#409BBE")),
+ blue: colorRamp(chroma("#9CCFD8")),
+ violet: colorRamp(chroma("#C4A7E7")),
+ magenta: colorRamp(chroma("#AB6FE9")),
+ },
override: { syntax: {} },
-})
+}
diff --git a/styles/src/themes/rose-pine/rose-pine.ts b/styles/src/themes/rose-pine/rose-pine.ts
index 233d8225f38..3aabe3f10e7 100644
--- a/styles/src/themes/rose-pine/rose-pine.ts
+++ b/styles/src/themes/rose-pine/rose-pine.ts
@@ -1,42 +1,37 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
+import {
+ chroma,
+ colorRamp,
+ ThemeAppearance,
+ ThemeLicenseType,
+ ThemeConfig,
+} from "../../common"
-const name = "Rosé Pine"
-
-const ramps = {
- neutral: chroma.scale([
- "#191724",
- "#1f1d2e",
- "#26233A",
- "#3E3A53",
- "#56526C",
- "#6E6A86",
- "#908CAA",
- "#E0DEF4",
- ]),
- red: colorRamp(chroma("#EB6F92")),
- orange: colorRamp(chroma("#EBBCBA")),
- yellow: colorRamp(chroma("#F6C177")),
- green: colorRamp(chroma("#8DBD8D")),
- cyan: colorRamp(chroma("#409BBE")),
- blue: colorRamp(chroma("#9CCFD8")),
- violet: colorRamp(chroma("#C4A7E7")),
- magenta: colorRamp(chroma("#AB6FE9")),
-}
-
-export const meta: Meta = {
- name,
+export const theme: ThemeConfig = {
+ name: "Rosé Pine",
author: "edunfelt",
- license: {
- SPDX: "MIT",
- },
- url: "https://github.com/edunfelt/base16-rose-pine-scheme",
-}
-
-export const dark = createColorScheme({
- name: meta.name,
- author: meta.author,
appearance: ThemeAppearance.Dark,
- inputColor: ramps,
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl: "https://github.com/edunfelt/base16-rose-pine-scheme",
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: {
+ neutral: chroma.scale([
+ "#191724",
+ "#1f1d2e",
+ "#26233A",
+ "#3E3A53",
+ "#56526C",
+ "#6E6A86",
+ "#908CAA",
+ "#E0DEF4",
+ ]),
+ red: colorRamp(chroma("#EB6F92")),
+ orange: colorRamp(chroma("#EBBCBA")),
+ yellow: colorRamp(chroma("#F6C177")),
+ green: colorRamp(chroma("#8DBD8D")),
+ cyan: colorRamp(chroma("#409BBE")),
+ blue: colorRamp(chroma("#9CCFD8")),
+ violet: colorRamp(chroma("#C4A7E7")),
+ magenta: colorRamp(chroma("#AB6FE9")),
+ },
override: { syntax: {} },
-})
+}
diff --git a/styles/src/themes/sandcastle/sandcastle.ts b/styles/src/themes/sandcastle/sandcastle.ts
index ab36d725a9f..753828c6657 100644
--- a/styles/src/themes/sandcastle/sandcastle.ts
+++ b/styles/src/themes/sandcastle/sandcastle.ts
@@ -1,42 +1,37 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
+import {
+ chroma,
+ colorRamp,
+ ThemeAppearance,
+ ThemeLicenseType,
+ ThemeConfig,
+} from "../../common"
-const name = "Sandcastle"
-
-const ramps = {
- neutral: chroma.scale([
- "#282c34",
- "#2c323b",
- "#3e4451",
- "#665c54",
- "#928374",
- "#a89984",
- "#d5c4a1",
- "#fdf4c1",
- ]),
- red: colorRamp(chroma("#B4637A")),
- orange: colorRamp(chroma("#a07e3b")),
- yellow: colorRamp(chroma("#a07e3b")),
- green: colorRamp(chroma("#83a598")),
- cyan: colorRamp(chroma("#83a598")),
- blue: colorRamp(chroma("#528b8b")),
- violet: colorRamp(chroma("#d75f5f")),
- magenta: colorRamp(chroma("#a87322")),
-}
-
-export const meta: Meta = {
- name,
+export const theme: ThemeConfig = {
+ name: "Sandcastle",
author: "gessig",
- license: {
- SPDX: "MIT",
- },
- url: "https://github.com/gessig/base16-sandcastle-scheme",
-}
-
-export const dark = createColorScheme({
- name: meta.name,
- author: meta.author,
appearance: ThemeAppearance.Dark,
- inputColor: ramps,
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl: "https://github.com/gessig/base16-sandcastle-scheme",
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: {
+ neutral: chroma.scale([
+ "#282c34",
+ "#2c323b",
+ "#3e4451",
+ "#665c54",
+ "#928374",
+ "#a89984",
+ "#d5c4a1",
+ "#fdf4c1",
+ ]),
+ red: colorRamp(chroma("#B4637A")),
+ orange: colorRamp(chroma("#a07e3b")),
+ yellow: colorRamp(chroma("#a07e3b")),
+ green: colorRamp(chroma("#83a598")),
+ cyan: colorRamp(chroma("#83a598")),
+ blue: colorRamp(chroma("#528b8b")),
+ violet: colorRamp(chroma("#d75f5f")),
+ magenta: colorRamp(chroma("#a87322")),
+ },
override: { syntax: {} },
-})
+}
diff --git a/styles/src/themes/solarized/solarized.ts b/styles/src/themes/solarized/solarized.ts
index e4c86d2939a..4084757525c 100644
--- a/styles/src/themes/solarized/solarized.ts
+++ b/styles/src/themes/solarized/solarized.ts
@@ -1,7 +1,10 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
-
-const name = "Solarized"
+import {
+ chroma,
+ colorRamp,
+ ThemeAppearance,
+ ThemeLicenseType,
+ ThemeConfig,
+} from "../../common"
const ramps = {
neutral: chroma
@@ -26,27 +29,24 @@ const ramps = {
magenta: colorRamp(chroma("#d33682")),
}
-export const meta: Meta = {
- name,
+export const dark: ThemeConfig = {
+ name: "Solarized Dark",
author: "Ethan Schoonover",
- license: {
- SPDX: "MIT",
- },
- url: "https://github.com/altercation/solarized",
-}
-
-export const dark = createColorScheme({
- name: `${name} Dark`,
- author: meta.author,
appearance: ThemeAppearance.Dark,
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl: "https://github.com/altercation/solarized",
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: ramps,
override: { syntax: {} },
-})
+}
-export const light = createColorScheme({
- name: `${name} Light`,
- author: meta.author,
+export const light: ThemeConfig = {
+ name: "Solarized Light",
+ author: "Ethan Schoonover",
appearance: ThemeAppearance.Light,
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl: "https://github.com/altercation/solarized",
+ licenseFile: `${__dirname}/LICENSE`,
inputColor: ramps,
override: { syntax: {} },
-})
+}
diff --git a/styles/src/themes/summercamp/summercamp.ts b/styles/src/themes/summercamp/summercamp.ts
index f9df22a2245..08098d2e2fd 100644
--- a/styles/src/themes/summercamp/summercamp.ts
+++ b/styles/src/themes/summercamp/summercamp.ts
@@ -1,44 +1,39 @@
-import chroma from "chroma-js"
-import { Meta, colorRamp, createColorScheme, ThemeAppearance } from "../common"
+import {
+ chroma,
+ colorRamp,
+ ThemeAppearance,
+ ThemeLicenseType,
+ ThemeConfig,
+} from "../../common"
-const name = "Summercamp"
-
-const ramps = {
- neutral: chroma
- .scale([
- "#1c1810",
- "#2a261c",
- "#3a3527",
- "#3a3527",
- "#5f5b45",
- "#736e55",
- "#bab696",
- "#f8f5de",
- ])
- .domain([0, 0.2, 0.38, 0.4, 0.65, 0.7, 0.85, 1]),
- red: colorRamp(chroma("#e35142")),
- orange: colorRamp(chroma("#fba11b")),
- yellow: colorRamp(chroma("#f2ff27")),
- green: colorRamp(chroma("#5ceb5a")),
- cyan: colorRamp(chroma("#5aebbc")),
- blue: colorRamp(chroma("#489bf0")),
- violet: colorRamp(chroma("#FF8080")),
- magenta: colorRamp(chroma("#F69BE7")),
-}
-
-export const meta: Meta = {
- name,
+export const theme: ThemeConfig = {
+ name: "Summercamp",
author: "zoefiri",
- url: "https://github.com/zoefiri/base16-sc",
- license: {
- SPDX: "MIT",
- },
-}
-
-export const dark = createColorScheme({
- name: meta.name,
- author: meta.author,
appearance: ThemeAppearance.Dark,
- inputColor: ramps,
+ licenseType: ThemeLicenseType.MIT,
+ licenseUrl: "https://github.com/zoefiri/base16-sc",
+ licenseFile: `${__dirname}/LICENSE`,
+ inputColor: {
+ neutral: chroma
+ .scale([
+ "#1c1810",
+ "#2a261c",
+ "#3a3527",
+ "#3a3527",
+ "#5f5b45",
+ "#736e55",
+ "#bab696",
+ "#f8f5de",
+ ])
+ .domain([0, 0.2, 0.38, 0.4, 0.65, 0.7, 0.85, 1]),
+ red: colorRamp(chroma("#e35142")),
+ orange: colorRamp(chroma("#fba11b")),
+ yellow: colorRamp(chroma("#f2ff27")),
+ green: colorRamp(chroma("#5ceb5a")),
+ cyan: colorRamp(chroma("#5aebbc")),
+ blue: colorRamp(chroma("#489bf0")),
+ violet: colorRamp(chroma("#FF8080")),
+ magenta: colorRamp(chroma("#F69BE7")),
+ },
override: { syntax: {} },
-})
+}