WIP Update theme metadata and add license information

This commit is contained in:
Nate Butler 2022-10-20 15:32:13 -04:00
parent bd8509990a
commit fbfe8a2311
11 changed files with 53 additions and 18 deletions

View File

@ -1,7 +1,13 @@
import chroma from "chroma-js";
import { colorRamp, createColorScheme } from "./common/ramps";
const name = "andromeda";
const name = "Andromeda";
const author = "";
const url = "";
const license = {
type: "",
url: "",
};
const ramps = {
neutral: chroma

View File

@ -1,7 +1,13 @@
import chroma from "chroma-js";
import { colorRamp, createColorScheme } from "./common/ramps";
const name = "cave";
const name = "Cave";
const author = "";
const url = "";
const license = {
type: "",
url: ""
}
export const dark = createColorScheme(`${name}-dark`, false, {
neutral: chroma
@ -37,7 +43,8 @@ export const light = createColorScheme(`${name}-light`, true, {
"#8b8792",
"#e2dfe7",
"#efecf4",
]).correctLightness(),
])
.correctLightness(),
red: colorRamp(chroma("#be4678")),
orange: colorRamp(chroma("#aa573c")),
yellow: colorRamp(chroma("#a06e3b")),
@ -46,4 +53,4 @@ export const light = createColorScheme(`${name}-light`, true, {
blue: colorRamp(chroma("#576ddb")),
violet: colorRamp(chroma("#955ae7")),
magenta: colorRamp(chroma("#bf40bf")),
});
});

View File

@ -116,8 +116,8 @@ export function createTheme(
on500Ok: {
base: sample(ramps.green, 0.05),
hovered: sample(ramps.green, 0.1),
active: sample(ramps.green, 0.15)
}
active: sample(ramps.green, 0.15),
},
};
const borderColor = {
@ -186,7 +186,7 @@ export function createTheme(
weight: fontWeights.normal,
},
"variable.special": {
color: sample(ramps.blue, 0.80),
color: sample(ramps.blue, 0.8),
weight: fontWeights.normal,
},
comment: {

View File

@ -142,9 +142,13 @@ function buildStyleSet(
ramp: Scale,
backgroundBase: number,
foregroundBase: number,
step: number = 0.08,
step: number = 0.08
): StyleSet {
let styleDefinitions = buildStyleDefinition(backgroundBase, foregroundBase, step);
let styleDefinitions = buildStyleDefinition(
backgroundBase,
foregroundBase,
step
);
function colorString(indexOrColor: number | Color): string {
if (typeof indexOrColor === "number") {
@ -172,7 +176,11 @@ function buildStyleSet(
};
}
function buildStyleDefinition(bgBase: number, fgBase: number, step: number = 0.08) {
function buildStyleDefinition(
bgBase: number,
fgBase: number,
step: number = 0.08
) {
return {
background: {
default: bgBase,
@ -199,4 +207,4 @@ function buildStyleDefinition(bgBase: number, fgBase: number, step: number = 0.0
inverted: bgBase + step * 2,
},
};
}
}

View File

@ -1,7 +1,9 @@
import chroma from "chroma-js";
import { colorRamp, createColorScheme } from "./common/ramps";
const name = "rosé-pine-dawn";
const name = "Rosé Pine Dawn";
const author = "";
const url = "";
const ramps = {
neutral: chroma

View File

@ -1,7 +1,9 @@
import chroma from "chroma-js";
import { colorRamp, createColorScheme } from "./common/ramps";
const name = "rosé-pine-moon";
const name = "Rosé Pine Moon";
const author = "";
const url = "";
const ramps = {
neutral: chroma

View File

@ -1,7 +1,9 @@
import chroma from "chroma-js";
import { colorRamp, createColorScheme } from "./common/ramps";
const name = "rosé-pine";
const name = "Rosé Pine";
const author = "";
const url = "";
const ramps = {
neutral: chroma.scale([

View File

@ -1,7 +1,9 @@
import chroma from "chroma-js";
import { colorRamp, createColorScheme } from "./common/ramps";
const name = "sandcastle";
const name = "Sandcastle";
const author = "";
const url = "";
const ramps = {
neutral: chroma.scale([

View File

@ -1,7 +1,9 @@
import chroma from "chroma-js";
import { colorRamp, createColorScheme } from "./common/ramps";
const name = "solarized";
const name = "Solarized";
const author = "";
const url = "";
const ramps = {
neutral: chroma

View File

@ -1,7 +1,9 @@
import chroma from "chroma-js";
import { colorRamp, createColorScheme } from "./common/ramps";
const name = "sulphurpool";
const name = "Sulphurpool";
const author = "";
const url = "";
const ramps = {
neutral: chroma

View File

@ -1,7 +1,9 @@
import chroma from "chroma-js";
import { colorRamp, createColorScheme } from "./common/ramps";
const name = "summercamp";
const name = "Summercamp";
const author = "";
const url = "";
const ramps = {
neutral: chroma