mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Add a syntax override style for One Dark
This commit is contained in:
parent
77ed437cda
commit
23c967418a
1 changed files with 38 additions and 11 deletions
|
@ -1,10 +1,22 @@
|
||||||
import chroma from "chroma-js"
|
import chroma from "chroma-js"
|
||||||
import { Meta } from "./common/colorScheme"
|
import { Meta, ThemeSyntax } from "./common/colorScheme"
|
||||||
import { colorRamp, createColorScheme } from "./common/ramps"
|
import { colorRamp, createColorScheme } from "./common/ramps"
|
||||||
|
|
||||||
const name = "One Dark"
|
const name = "One Dark"
|
||||||
|
|
||||||
export const dark = createColorScheme(`${name}`, false, {
|
const color = {
|
||||||
|
white: "#ACB2BE",
|
||||||
|
grey: "#5D636F",
|
||||||
|
red: "#D07277",
|
||||||
|
orange: "#C0966B",
|
||||||
|
yellow: "#DFC184",
|
||||||
|
green: "#A1C181",
|
||||||
|
teal: "#6FB4C0",
|
||||||
|
blue: "#74ADE9",
|
||||||
|
purple: "#B478CF",
|
||||||
|
};
|
||||||
|
|
||||||
|
const ramps = {
|
||||||
neutral: chroma
|
neutral: chroma
|
||||||
.scale([
|
.scale([
|
||||||
"#282c34",
|
"#282c34",
|
||||||
|
@ -17,16 +29,31 @@ export const dark = createColorScheme(`${name}`, false, {
|
||||||
"#c8ccd4",
|
"#c8ccd4",
|
||||||
])
|
])
|
||||||
.domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]),
|
.domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]),
|
||||||
|
red: colorRamp(chroma(color.red)),
|
||||||
red: colorRamp(chroma("#e06c75")),
|
orange: colorRamp(chroma(color.orange)),
|
||||||
orange: colorRamp(chroma("#d19a66")),
|
yellow: colorRamp(chroma(color.yellow)),
|
||||||
yellow: colorRamp(chroma("#e5c07b")),
|
green: colorRamp(chroma(color.green)),
|
||||||
green: colorRamp(chroma("#98c379")),
|
cyan: colorRamp(chroma(color.teal)),
|
||||||
cyan: colorRamp(chroma("#56b6c2")),
|
blue: colorRamp(chroma(color.blue)),
|
||||||
blue: colorRamp(chroma("#61afef")),
|
violet: colorRamp(chroma(color.purple)),
|
||||||
violet: colorRamp(chroma("#c678dd")),
|
|
||||||
magenta: colorRamp(chroma("#be5046")),
|
magenta: colorRamp(chroma("#be5046")),
|
||||||
})
|
};
|
||||||
|
|
||||||
|
const syntax: ThemeSyntax = {
|
||||||
|
primary: { color: color.white },
|
||||||
|
comment: { color: color.grey },
|
||||||
|
function: { color: color.blue },
|
||||||
|
type: { color: color.teal },
|
||||||
|
property: { color: color.red },
|
||||||
|
number: { color: color.orange },
|
||||||
|
string: { color: color.green },
|
||||||
|
keyword: { color: color.purple },
|
||||||
|
boolean: { color: color.orange },
|
||||||
|
punctuation: { color: color.white },
|
||||||
|
operator: { color: color.teal }
|
||||||
|
}
|
||||||
|
|
||||||
|
export const dark = createColorScheme(name, false, ramps, syntax)
|
||||||
|
|
||||||
export const meta: Meta = {
|
export const meta: Meta = {
|
||||||
name,
|
name,
|
||||||
|
|
Loading…
Reference in a new issue