mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 02:46:43 +00:00
Rename One theme and update Zed default theme
This commit is contained in:
parent
c83cae60f6
commit
bd8509990a
5 changed files with 284 additions and 306 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
// The name of the Zed theme to use for the UI
|
||||
"theme": "one-dark",
|
||||
"theme": "One Dark",
|
||||
// The name of a font to use for rendering text in the editor
|
||||
"buffer_font_family": "Zed Mono",
|
||||
// The default font size for text in the editor
|
||||
|
|
|
@ -665,7 +665,7 @@ mod tests {
|
|||
fn test_write_theme_into_settings_with_theme() {
|
||||
let settings = r#"
|
||||
{
|
||||
"theme": "one-dark"
|
||||
"theme": "One Dark"
|
||||
}
|
||||
"#
|
||||
.unindent();
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
import chroma from "chroma-js";
|
||||
import { colorRamp, createColorScheme } from "./common/ramps";
|
||||
|
||||
const name = "one";
|
||||
const author = "Chris Kempson (http://chriskempson.com)";
|
||||
const url =
|
||||
"https://github.com/chriskempson/base16-vim/blob/master/colors/base16-onedark.vim";
|
||||
|
||||
const base00 = "#282c34";
|
||||
const base01 = "#353b45";
|
||||
const base02 = "#3e4451";
|
||||
const base03 = "#545862";
|
||||
const base04 = "#565c64";
|
||||
const base05 = "#abb2bf";
|
||||
const base06 = "#b6bdca";
|
||||
const base07 = "#c8ccd4";
|
||||
const base08 = "#e06c75";
|
||||
const base09 = "#d19a66";
|
||||
const base0A = "#e5c07b";
|
||||
const base0B = "#98c379";
|
||||
const base0C = "#56b6c2";
|
||||
const base0D = "#61afef";
|
||||
const base0E = "#c678dd";
|
||||
const base0F = "#be5046";
|
||||
|
||||
const ramps = {
|
||||
neutral: chroma
|
||||
.scale([base00, base01, base02, base03, base04, base05, base06, base07])
|
||||
.domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]),
|
||||
red: colorRamp(chroma(base08)),
|
||||
orange: colorRamp(chroma(base09)),
|
||||
yellow: colorRamp(chroma(base0A)),
|
||||
green: colorRamp(chroma(base0B)),
|
||||
cyan: colorRamp(chroma(base0C)),
|
||||
blue: colorRamp(chroma(base0D)),
|
||||
violet: colorRamp(chroma(base0E)),
|
||||
magenta: colorRamp(chroma(base0F)),
|
||||
};
|
||||
|
||||
export const dark = createColorScheme(`${name}-dark`, false, ramps);
|
|
@ -1,40 +0,0 @@
|
|||
import chroma from "chroma-js";
|
||||
import { colorRamp, createColorScheme } from "./common/ramps";
|
||||
|
||||
const name = "one";
|
||||
const author = "Daniel Pfeifer (http://github.com/purpleKarrot)";
|
||||
const url =
|
||||
"https://github.com/purpleKarrot/base16-one-light-scheme/blob/master/one-light.yaml";
|
||||
|
||||
const base00 = "#090a0b";
|
||||
const base01 = "#202227";
|
||||
const base02 = "#383a42";
|
||||
const base03 = "#696c77";
|
||||
const base04 = "#a0a1a7";
|
||||
const base05 = "#e5e5e6";
|
||||
const base06 = "#f0f0f1";
|
||||
const base07 = "#fafafa";
|
||||
const base08 = "#ca1243";
|
||||
const base09 = "#d75f00";
|
||||
const base0A = "#c18401";
|
||||
const base0B = "#50a14f";
|
||||
const base0C = "#0184bc";
|
||||
const base0D = "#4078f2";
|
||||
const base0E = "#a626a4";
|
||||
const base0F = "#986801";
|
||||
|
||||
const ramps = {
|
||||
neutral: chroma
|
||||
.scale([base00, base01, base02, base03, base04, base05, base06, base07])
|
||||
.domain([0, 0.05, 0.77, 1]),
|
||||
red: colorRamp(chroma(base08)),
|
||||
orange: colorRamp(chroma(base09)),
|
||||
yellow: colorRamp(chroma(base0A)),
|
||||
green: colorRamp(chroma(base0B)),
|
||||
cyan: colorRamp(chroma(base0C)),
|
||||
blue: colorRamp(chroma(base0D)),
|
||||
violet: colorRamp(chroma(base0E)),
|
||||
magenta: colorRamp(chroma(base0F)),
|
||||
};
|
||||
|
||||
export const light = createColorScheme(`${name}-light`, true, ramps);
|
58
styles/src/themes/one.ts
Normal file
58
styles/src/themes/one.ts
Normal file
|
@ -0,0 +1,58 @@
|
|||
import chroma from "chroma-js";
|
||||
import { colorRamp, createColorScheme } from "./common/ramps";
|
||||
|
||||
const name = "One";
|
||||
const author = "";
|
||||
const url = "";
|
||||
const license = {
|
||||
type: "",
|
||||
url: "",
|
||||
};
|
||||
|
||||
export const dark = createColorScheme(`${name} Dark`, false, {
|
||||
neutral: chroma
|
||||
.scale([
|
||||
"#282c34",
|
||||
"#353b45",
|
||||
"#3e4451",
|
||||
"#545862",
|
||||
"#565c64",
|
||||
"#abb2bf",
|
||||
"#b6bdca",
|
||||
"#c8ccd4",
|
||||
])
|
||||
.domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]),
|
||||
|
||||
red: colorRamp(chroma("#e06c75")),
|
||||
orange: colorRamp(chroma("#d19a66")),
|
||||
yellow: colorRamp(chroma("#e5c07b")),
|
||||
green: colorRamp(chroma("#98c379")),
|
||||
cyan: colorRamp(chroma("#56b6c2")),
|
||||
blue: colorRamp(chroma("#61afef")),
|
||||
violet: colorRamp(chroma("#c678dd")),
|
||||
magenta: colorRamp(chroma("#be5046")),
|
||||
});
|
||||
|
||||
export const light = createColorScheme(`${name} Light`, true, {
|
||||
neutral: chroma
|
||||
.scale([
|
||||
"#090a0b",
|
||||
"#202227",
|
||||
"#383a42",
|
||||
"#696c77",
|
||||
"#a0a1a7",
|
||||
"#e5e5e6",
|
||||
"#f0f0f1",
|
||||
"#fafafa",
|
||||
])
|
||||
.domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]),
|
||||
|
||||
red: colorRamp(chroma("#ca1243")),
|
||||
orange: colorRamp(chroma("#d75f00")),
|
||||
yellow: colorRamp(chroma("#c18401")),
|
||||
green: colorRamp(chroma("#50a14f")),
|
||||
cyan: colorRamp(chroma("#0184bc")),
|
||||
blue: colorRamp(chroma("#4078f2")),
|
||||
violet: colorRamp(chroma("#a626a4")),
|
||||
magenta: colorRamp(chroma("#986801")),
|
||||
});
|
Loading…
Reference in a new issue