zed/styles/themes/dark.ts

249 lines
6.4 KiB
TypeScript
Raw Normal View History

import core from "../tokens/core";
import Theme, { NumberToken, Syntax } from "./theme";
2022-04-01 02:05:21 +00:00
const { color } = core;
2022-04-01 00:32:47 +00:00
const backgroundColor = {
2022-04-01 00:51:25 +00:00
100: {
2022-04-01 02:05:21 +00:00
base: color.neutral[750],
hovered: color.neutral[750],
active: color.neutral[750],
focused: color.neutral[750],
2022-04-01 00:51:25 +00:00
},
300: {
2022-04-01 02:05:21 +00:00
base: color.neutral[800],
hovered: color.neutral[800],
active: color.neutral[800],
focused: color.neutral[800],
2022-04-01 00:51:25 +00:00
},
500: {
2022-04-01 02:05:21 +00:00
base: color.neutral[900],
hovered: color.neutral[900],
active: color.neutral[900],
focused: color.neutral[900],
2022-04-01 00:51:25 +00:00
},
ok: {
2022-04-01 02:05:21 +00:00
base: color.green[600],
hovered: color.green[600],
active: color.green[600],
focused: color.green[600],
2022-04-01 00:51:25 +00:00
},
error: {
2022-04-01 02:05:21 +00:00
base: color.red[400],
hovered: color.red[400],
active: color.red[400],
focused: color.red[400],
2022-04-01 00:51:25 +00:00
},
warning: {
2022-04-01 02:05:21 +00:00
base: color.amber[300],
hovered: color.amber[300],
active: color.amber[300],
focused: color.amber[300],
2022-04-01 00:51:25 +00:00
},
info: {
2022-04-01 02:05:21 +00:00
base: color.blue[500],
hovered: color.blue[500],
active: color.blue[500],
focused: color.blue[500],
},
2022-04-01 00:51:25 +00:00
};
const borderColor = {
2022-04-01 02:05:21 +00:00
primary: color.neutral[850],
secondary: color.neutral[700],
muted: color.neutral[750],
focused: color.neutral[100],
active: color.neutral[500],
ok: color.neutral[999],
error: color.neutral[999],
warning: color.neutral[999],
info: color.neutral[999],
2022-04-01 00:51:25 +00:00
};
const textColor = {
2022-04-01 02:05:21 +00:00
primary: color.neutral[150],
secondary: color.neutral[350],
muted: color.neutral[550],
placeholder: color.neutral[750],
active: color.neutral[0],
//TODO: (design) define feature and it's correct value
feature: color.sky[500],
ok: color.green[600],
error: color.red[400],
warning: color.amber[300],
info: color.blue[500],
2022-04-01 00:32:47 +00:00
};
const iconColor = {
2022-04-01 02:05:21 +00:00
primary: color.neutral[300],
secondary: color.neutral[500],
muted: color.neutral[600],
placeholder: color.neutral[700],
active: color.neutral[50],
//TODO: (design) define feature and it's correct value
feature: color.sky[500],
ok: color.green[600],
error: color.red[400],
warning: color.amber[300],
info: color.blue[500],
2022-04-01 00:32:47 +00:00
};
const player = {
1: {
baseColor: color.blue[600],
cursorColor: color.blue[600],
selectionColor: color.blue[600],
borderColor: color.blue[600],
},
2: {
baseColor: color.indigo[500],
cursorColor: color.indigo[500],
selectionColor: color.indigo[500],
borderColor: color.indigo[500],
},
3: {
baseColor: color.green[500],
cursorColor: color.green[500],
selectionColor: color.green[500],
borderColor: color.green[500],
},
4: {
baseColor: color.orange[500],
cursorColor: color.orange[500],
selectionColor: color.orange[500],
borderColor: color.orange[500],
},
5: {
baseColor: color.purple[500],
cursorColor: color.purple[500],
selectionColor: color.purple[500],
borderColor: color.purple[500],
},
6: {
baseColor: color.teal[400],
cursorColor: color.teal[400],
selectionColor: color.teal[400],
borderColor: color.teal[400],
},
7: {
baseColor: color.pink[400],
cursorColor: color.pink[400],
selectionColor: color.pink[400],
borderColor: color.pink[400],
},
8: {
baseColor: color.yellow[400],
cursorColor: color.yellow[400],
selectionColor: color.yellow[400],
borderColor: color.yellow[400],
},
};
// TODO: Fixup
2022-04-01 00:51:25 +00:00
const editor = {
2022-04-01 02:05:21 +00:00
background: backgroundColor[500].base,
indent_guide: borderColor.muted,
indent_guide_active: borderColor.secondary,
2022-04-01 00:51:25 +00:00
line: {
active: color.neutral[0],
highlighted: color.neutral[0],
inserted: backgroundColor.ok.active,
deleted: backgroundColor.error.active,
modified: backgroundColor.info.active,
2022-04-01 00:51:25 +00:00
},
highlight: {
selection: player[1].selectionColor,
occurrence: backgroundColor[500].active,
activeOccurrence: color.neutral[0],
matchingBracket: color.neutral[0],
match: color.neutral[0],
activeMatch: color.neutral[0],
related: color.neutral[0],
2022-04-01 00:51:25 +00:00
},
gutter: {
primary: color.neutral[0],
active: color.neutral[0],
2022-04-01 00:51:25 +00:00
},
2022-04-01 00:32:47 +00:00
};
const syntax: Syntax = {
2022-04-01 00:51:25 +00:00
primary: {
2022-04-01 02:05:21 +00:00
color: textColor.primary,
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
comment: {
2022-04-01 02:05:21 +00:00
color: color.lime[200],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
punctuation: {
2022-04-01 02:05:21 +00:00
color: textColor.primary,
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
constant: {
2022-04-01 02:05:21 +00:00
color: color.neutral[150],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
keyword: {
2022-04-01 02:05:21 +00:00
color: color.sky[400],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
function: {
2022-04-01 02:05:21 +00:00
color: color.yellow[200],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
type: {
2022-04-01 02:05:21 +00:00
color: color.teal[300],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
variant: {
2022-04-01 02:05:21 +00:00
color: color.teal[300],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
property: {
2022-04-01 02:05:21 +00:00
color: color.sky[300],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
enum: {
2022-04-01 02:05:21 +00:00
color: color.sky[400],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
operator: {
2022-04-01 02:05:21 +00:00
color: color.sky[400],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
string: {
2022-04-01 02:05:21 +00:00
color: color.orange[300],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
number: {
2022-04-01 02:05:21 +00:00
color: color.neutral[150],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
boolean: {
2022-04-01 02:05:21 +00:00
color: color.neutral[150],
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
predictive: {
2022-04-01 02:05:21 +00:00
color: textColor.muted,
weight: { value: "normal", type: "fontWeight" },
2022-04-01 00:32:47 +00:00
},
2022-04-01 00:51:25 +00:00
};
const shadowAlpha: NumberToken = {
value: 0.32,
type: "number"
2022-04-01 00:32:47 +00:00
};
const theme: Theme = {
name: "dark",
backgroundColor,
borderColor,
textColor,
iconColor,
editor,
syntax,
player,
shadowAlpha,
2022-04-01 00:32:47 +00:00
};
export default theme;