Add syntax overrides for One Light

This commit is contained in:
Nate Butler 2023-02-26 10:09:16 -05:00
parent 4f307c7601
commit 64b07dbfeb

View file

@ -1,32 +1,71 @@
import chroma from "chroma-js" import chroma from "chroma-js"
import { Meta } from "./common/colorScheme" import { fontWeights } from "../common";
import { Meta, ThemeSyntax } from "./common/colorScheme"
import { colorRamp, createColorScheme } from "./common/ramps" import { colorRamp, createColorScheme } from "./common/ramps"
const name = "One Light" const name = "One Light"
export const light = createColorScheme(`${name}`, true, { const color = {
black: "#383A41",
grey: "#A2A3A7",
red: "#D36050",
orange: "#AD6F26",
yellow: "#DFC184",
green: "#659F58",
teal: "#3982B7",
blue: "#5B79E3",
purple: "#A449AB",
magenta: "#994EA6"
};
const ramps = {
neutral: chroma neutral: chroma
.scale([ .scale([
"#090a0b", "#383A41",
"#202227", "#535456",
"#383a42",
"#696c77", "#696c77",
"#a0a1a7", "#9D9D9F",
"#e5e5e6", "#A9A9A9",
"#f0f0f1", "#DBDBDC",
"#fafafa", "#EAEAEB",
"#FAFAFA",
]) ])
.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)),
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)),
};
red: colorRamp(chroma("#ca1243")), const syntax: ThemeSyntax = {
orange: colorRamp(chroma("#d75f00")), primary: { color: color.black },
yellow: colorRamp(chroma("#c18401")), "variable.special": { color: color.orange },
green: colorRamp(chroma("#50a14f")), comment: { color: color.grey },
cyan: colorRamp(chroma("#0184bc")), punctuation: { color: color.black },
blue: colorRamp(chroma("#4078f2")), keyword: { color: color.purple },
violet: colorRamp(chroma("#a626a4")), function: { color: color.blue },
magenta: colorRamp(chroma("#986801")), type: { color: color.teal },
}) variant: { color: color.blue },
property: { color: color.red },
enum: { color: color.red },
operator: { color: color.teal },
string: { color: color.green },
number: { color: color.orange },
boolean: { color: color.orange },
title: { color: color.red, weight: fontWeights.normal },
"emphasis.strong": {
color: color.orange,
},
linkText: { color: color.blue },
linkUri: { color: color.teal },
}
export const light = createColorScheme(name, true, ramps, syntax)
export const meta: Meta = { export const meta: Meta = {
name, name,