solarized.ts

 1import chroma from "chroma-js";
 2import { colorRamp, createColorScheme } from "./common/ramps";
 3
 4const name = "solarized";
 5
 6const ramps = {
 7  neutral: chroma
 8    .scale([
 9      "#002b36",
10      "#073642",
11      "#586e75",
12      "#657b83",
13      "#839496",
14      "#93a1a1",
15      "#eee8d5",
16      "#fdf6e3",
17    ])
18    .domain([0, 0.2, 0.38, 0.45, 0.65, 0.7, 0.85, 1]),
19  red: colorRamp(chroma("#dc322f")),
20  orange: colorRamp(chroma("#cb4b16")),
21  yellow: colorRamp(chroma("#b58900")),
22  green: colorRamp(chroma("#859900")),
23  cyan: colorRamp(chroma("#2aa198")),
24  blue: colorRamp(chroma("#268bd2")),
25  violet: colorRamp(chroma("#6c71c4")),
26  magenta: colorRamp(chroma("#d33682")),
27};
28
29export const dark = createColorScheme(`${name}-dark`, false, ramps);
30export const light = createColorScheme(`${name}-light`, true, ramps);