Skip to content

Commit

Permalink
typescript: init
Browse files Browse the repository at this point in the history
  • Loading branch information
nzbr committed Dec 18, 2023
1 parent 577c727 commit 4ffe4ff
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 0 deletions.
1 change: 1 addition & 0 deletions base16/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ build(
"tex.ejs", join("..", "pandoc", "partials", `copperflame-colors.tex`)
);
build("scss.ejs", join("..", "css", "palette.scss"));
build("ts.ejs", join("..", "typescript", "palette.ts"));
build(join("logo", "icon.svg.ejs"), join("..", "assets", "icon.svg"));
build(join("logo", "logo.svg.ejs"), join("..", "assets", "logo.svg"));
build(join("logo", "logo-pro.svg.ejs"), join("..", "assets", "logo-pro.svg"));
Expand Down
5 changes: 5 additions & 0 deletions base16/ts.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const palette = {
<% Object.keys(base).forEach((key) => { -%>
base<%- key %>: "#<%- base[key]["hex"] %>",
<% }); -%>
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "copperflame",
"author": "nzbr",
"version": "0.0.1",
"license": "ISC",
"scripts": {
"base16": "node base16/build.js",
Expand Down
41 changes: 41 additions & 0 deletions typescript/colors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { palette } from "./palette";

export interface ColorScheme {
foreground: string;
background: string;
foregroundSecondary: string;
backgroundSecondary: string;
error: string;
shadow: string;
highlight: string;
}

export const darkColors: ColorScheme = {
foreground: palette.base06,
background: palette.base00,
foregroundSecondary: palette.base04,
backgroundSecondary: palette.base01,
error: palette.base08,
shadow: "#000000",
highlight: palette.baseF6,
}

export const darkProColors: ColorScheme = {
...darkColors,
highlight: palette.baseF4,
}

export const lightColors: ColorScheme = {
foreground: palette.base01,
background: palette.base07,
foregroundSecondary: palette.base03,
backgroundSecondary: palette.base06,
error: palette.base08,
shadow: palette.base03,
highlight: palette.baseF5,
}

export const lightProColors: ColorScheme = {
...lightColors,
highlight: palette.baseF4,
}
35 changes: 35 additions & 0 deletions typescript/palette.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
export const palette = {
base00: "#111111",
base01: "#1B1B1B",
base02: "#303030",
base03: "#5E5E5E",
base04: "#919191",
base05: "#C6C6C6",
base06: "#E6E6E6",
base07: "#FFFFFF",
base08: "#ED4F5A",
base09: "#3DA794",
base0A: "#578158",
base0B: "#569CD6",
base0C: "#718C48",
base0D: "#40AB31",
base0E: "#755DB4",
base0F: "#736299",
baseF0: "#001100",
baseF1: "#001B00",
baseF2: "#003000",
baseF3: "#005E00",
baseF4: "#009100",
baseF5: "#00C600",
baseF6: "#00E600",
baseF7: "#00FF00",
baseF8: "#0A0014",
baseF9: "#140423",
baseFA: "#19083D",
baseFB: "#21096A",
baseFC: "#2D0A99",
baseFD: "#3404C9",
baseFE: "#3A01E8",
baseFF: "#4000FF",
};

0 comments on commit 4ffe4ff

Please sign in to comment.