Webconfig: Remove colorschemes from js

This still keeps the Nord and Solarized palettes because we use the
backgrounds in the sample background list.
This commit is contained in:
Fabian Homborg 2021-07-09 20:31:28 +02:00
parent 51a55b25dc
commit 072d735853

View file

@ -223,190 +223,6 @@ function interpret_color(str) {
return '#' + str
}
var color_scheme_fish_default = {
'name': 'fish default',
'colors': [],
'preferred_background': 'black',
'autosuggestion': '555 brblack',
'command': '005fd7',
'param': '00afff',
'redirection': '00afff',
'comment': '990000',
'error': 'ff0000',
'escape': '00a6b2',
'operator': '00a6b2',
'quote': '999900',
'end': '009900',
'search_match' : 'bryellow --background=brblack',
'fish_pager_color_completion' : '',
'fish_pager_color_description' : 'B3A06D yellow',
'fish_pager_color_prefix' : 'normal --bold --underline',
'fish_pager_color_progress' : 'brwhite --background=cyan',
'normal' : 'normal',
'user' : 'brgreen',
'host' : 'normal',
'valid_path' : '--underline',
'cwd' : 'green',
'cwd_root' : 'red',
'match' : '--background=brblue',
'selection' : 'white --bold --background=brblack',
'cancel' : '-r',
'history_current' : '--bold'
};
var ayuTheme = {
ayu_dark: {
'accent': 'E6B450',
'bg': '0A0E14',
'fg': 'B3B1AD',
'ui': '4D5566',
'tag': '39BAE6',
'func': 'FFB454',
'entity': '59C2FF',
'string': 'C2D94C',
'regexp': '95E6CB',
'markup': 'F07178',
'keyword': 'FF8F40',
'special': 'E6B673',
'comment': '626A73',
'constant': 'FFEE99',
'operator': 'F29668',
'error': 'FF3333',
},
ayu_light: {
'accent': 'FF9940',
'bg': 'FAFAFA',
'fg': '575F66',
'ui': '8A9199',
'tag': '55B4D4',
'func': 'F2AE49',
'entity': '399EE6',
'string': '86B300',
'regexp': '4CBF99',
'markup': 'F07171',
'keyword': 'FA8D3E',
'special': 'E6BA7E',
'comment': 'ABB0B6',
'constant': 'A37ACC',
'operator': 'ED9366',
'error': 'F51818',
},
ayu_mirage: {
'accent': 'FFCC66',
'bg': '1F2430',
'fg': 'CBCCC6',
'ui': '707A8C',
'tag': '5CCFE6',
'func': 'FFD580',
'entity': '73D0FF',
'string': 'BAE67E',
'regexp': '95E6CB',
'markup': 'F28779',
'keyword': 'FFA759',
'special': 'FFE6B3',
'comment': '5C6773',
'constant': 'D4BFFF',
'operator': 'F29E74',
'error': 'FF3333',
},
apply: function(theme, receiver) {
receiver['preferred_background'] = theme.bg
receiver['autosuggestion'] = theme.ui
receiver['command'] = theme.tag
receiver['comment'] = theme.comment
receiver['cwd'] = theme.entity
receiver['end'] = theme.operator
receiver['error'] = theme.error
receiver['escape'] = theme.regexp
receiver['match'] = theme.markup
receiver['normal'] = theme.fg
receiver['operator'] = theme.accent
receiver['param'] = theme.fg
receiver['quote'] = theme.string
receiver['redirection'] = theme.constant
receiver['search_match'] = "--background="+theme.accent
receiver['selection'] = "--background="+theme.accent
receiver['colors'] = []
for (var key in theme) receiver['colors'].push(theme[key])
},
}
// ayu Light
var color_scheme_ayu_light = {
name: 'ayu Light',
url: 'https://github.com/dempfi/ayu',
}
ayuTheme.apply(ayuTheme.ayu_light, color_scheme_ayu_light)
// ayu Dark
var color_scheme_ayu_dark = {
name: 'ayu Dark',
url: 'https://github.com/dempfi/ayu',
}
ayuTheme.apply(ayuTheme.ayu_dark, color_scheme_ayu_dark)
// ayu Mirage
var color_scheme_ayu_mirage = {
name: 'ayu Mirage',
url: 'https://github.com/dempfi/ayu',
}
ayuTheme.apply(ayuTheme.ayu_mirage, color_scheme_ayu_mirage)
var TomorrowTheme = {
tomorrow_night: {'Background': '1d1f21', 'Current Line': '282a2e', 'Selection': '373b41', 'Foreground': 'c5c8c6', 'Comment': '969896', 'Red': 'cc6666', 'Orange': 'de935f', 'Yellow': 'f0c674', 'Green': 'b5bd68', 'Aqua': '8abeb7', 'Blue': '81a2be', 'Purple': 'b294bb'
},
tomorrow: {'Background': 'ffffff', 'Current Line': 'efefef', 'Selection': 'd6d6d6', 'Foreground': '4d4d4c', 'Comment': '8e908c', 'Red': 'c82829', 'Orange': 'f5871f', 'Yellow': 'eab700', 'Green': '718c00', 'Aqua': '3e999f', 'Blue': '4271ae', 'Purple': '8959a8'
},
tomorrow_night_bright: {'Background': '000000', 'Current Line': '2a2a2a', 'Selection': '424242', 'Foreground': 'eaeaea', 'Comment': '969896', 'Red': 'd54e53', 'Orange': 'e78c45', 'Yellow': 'e7c547', 'Green': 'b9ca4a', 'Aqua': '70c0b1', 'Blue': '7aa6da', 'Purple': 'c397d8'},
apply: function(theme, receiver){
receiver['autosuggestion'] = theme['Comment']
receiver['command'] = theme['Purple']
receiver['comment'] = theme['Yellow'] /* we want to use comment for autosuggestions */
receiver['end'] = theme['Purple']
receiver['error'] = theme['Red']
receiver['param'] = theme['Blue']
receiver['quote'] = theme['Green']
receiver['redirection'] = theme['Aqua']
receiver['colors'] = []
for (var key in theme) receiver['colors'].push(theme[key])
}
}
var Base16Theme = {
base16_default_dark: { base00: '181818', base01: '282828', base02: '383838', base03: '585858', base04: 'b8b8b8', base05: 'd8d8d8', base06: 'e8e8e8', base07: 'f8f8f8', base08: 'ab4642', base09: 'dc9656', base0A: 'f7ca88', base0B: 'a1b56c', base0C: '86c1b9', base0D: '7cafc2', base0E: 'ba8baf', base0F: 'a16946' },
base16_default_light: { base00: 'f8f8f8', base01: 'e8e8e8', base02: 'd8d8d8', base03: 'b8b8b8', base04: '585858', base05: '383838', base06: '282828', base07: '181818', base08: 'ab4642', base09: 'dc9656', base0A: 'f7ca88', base0B: 'a1b56c', base0C: '86c1b9', base0D: '7cafc2', base0E: 'ba8baf', base0F: 'a16946' },
base16_eighties: { base00: '2d2d2d', base01: '393939', base02: '515151', base03: '747369', base04: 'a09f93', base05: 'd3d0c8', base06: 'e8e6df', base07: 'f2f0ec', base08: 'f2777a', base09: 'f99157', base0A: 'ffcc66', base0B: '99cc99', base0C: '66cccc', base0D: '6699cc', base0E: 'cc99cc', base0F: 'd27b53' },
apply: function(theme, receiver) {
receiver['autosuggestion'] = theme.base03
receiver['command'] = theme.base0B
receiver['comment'] = theme.base0A
receiver['end'] = theme.base0E
receiver['error'] = theme.base08
receiver['param'] = theme.base05
receiver['operator'] = theme.base0D
receiver['escape'] = theme.base0C
receiver['quote'] = theme.base0A
receiver['redirection'] = theme.base05
receiver['match'] = theme.base0D
receiver['colors'] = []
for (var key in theme) receiver['colors'].push(theme[key])
},
}
var nord = {
nord0: '2e3440',
nord1: '3b4252',
@ -426,254 +242,6 @@ var nord = {
nord15: 'b48ead',
};
var color_scheme_nord = {
name: "Nord",
colors: dict_values(nord),
preferred_background: '#' + nord.nord0,
autosuggestion: nord.nord3,
command: nord.nord9,
comment: nord.nord2,
end: nord.nord8,
error: nord.nord13,
param: nord.nord6,
quote: nord.nord14,
redirection: nord.nord15,
url: 'http://www.nordtheme.com/'
};
var solarized = {
base03: '002b36', base02: '073642', base01: '586e75', base00: '657b83', base0: '839496', base1: '93a1a1', base2: 'eee8d5', base3: 'fdf6e3', yellow: 'b58900', orange: 'cb4b16', red: 'dc322f', magenta: 'd33682', violet: '6c71c4', blue: '268bd2', cyan: '2aa198', green: '859900'
};
/* Sample color schemes */
var color_scheme_solarized_light = {
name: "Solarized Light",
colors: dict_values(solarized),
preferred_background: '#' + solarized.base3,
autosuggestion: solarized.base1,
command: solarized.base01,
comment: solarized.base1,
end: solarized.blue,
error: solarized.red,
param: solarized.base00,
quote: solarized.base0,
redirection: solarized.violet,
search_match: 'bryellow --background=white',
fish_pager_color_completion: 'green',
fish_pager_color_description: 'B3A06D',
fish_pager_color_prefix: 'cyan --underline',
fish_pager_color_progress: 'brwhite --background=cyan',
url: 'http://ethanschoonover.com/solarized'
};
var color_scheme_solarized_dark = {
name: "Solarized Dark",
colors: dict_values(solarized),
preferred_background: '#' + solarized.base03,
autosuggestion: solarized.base01,
command: solarized.base1,
comment: solarized.base01,
end: solarized.blue,
error: solarized.red,
param: solarized.base0,
quote: solarized.base00,
redirection: solarized.violet,
search_match: 'bryellow --background=black',
fish_pager_color_completion: 'B3A06D',
fish_pager_color_description: 'B3A06D',
fish_pager_color_prefix: 'cyan --underline',
fish_pager_color_progress: 'brwhite --background=cyan',
url: 'http://ethanschoonover.com/solarized'
};
var color_scheme_tomorrow = {
name: 'Tomorrow',
preferred_background: 'white',
url: 'https://github.com/chriskempson/tomorrow-theme'
}
TomorrowTheme.apply(TomorrowTheme.tomorrow, color_scheme_tomorrow)
var color_scheme_tomorrow_night = {
name: 'Tomorrow Night',
preferred_background: '#232323',
url: 'https://github.com/chriskempson/tomorrow-theme'
}
TomorrowTheme.apply(TomorrowTheme.tomorrow_night, color_scheme_tomorrow_night)
var color_scheme_tomorrow_night_bright = {
'name': 'Tomorrow Night Bright',
'preferred_background': 'black',
'url': 'https://github.com/chriskempson/tomorrow-theme',
}
TomorrowTheme.apply(TomorrowTheme.tomorrow_night_bright, color_scheme_tomorrow_night_bright)
var color_scheme_base16_default_dark = {
name: 'Base16 Default Dark',
preferred_background: Base16Theme.base16_default_dark.base00,
url: 'https://github.com/chriskempson/base16-default-schemes',
}
Base16Theme.apply(Base16Theme.base16_default_dark, color_scheme_base16_default_dark)
var color_scheme_base16_default_light = {
name: 'Base16 Default Light',
preferred_background: Base16Theme.base16_default_light.base00,
url: 'https://github.com/chriskempson/base16-default-schemes',
}
Base16Theme.apply(Base16Theme.base16_default_light, color_scheme_base16_default_light)
var color_scheme_base16_eighties = {
name: 'Base16 Eighties',
preferred_background: Base16Theme.base16_eighties.base00,
url: 'https://github.com/chriskempson/base16-default-schemes',
}
Base16Theme.apply(Base16Theme.base16_eighties, color_scheme_base16_eighties)
function construct_scheme_analogous(label, background, color_list) {
return {
name: label,
preferred_background: background,
colors: color_list,
command: color_list[0],
quote: color_list[6],
param: color_list[5],
autosuggestion: color_list[4],
error: color_list[9],
comment: color_list[12],
end: color_list[10],
redirection: color_list[11]
};
}
function construct_scheme_triad(label, background, color_list) {
return {
name: label,
preferred_background: background,
colors: color_list,
command: color_list[0],
quote: color_list[2],
param: color_list[1],
autosuggestion: color_list[3],
redirection: color_list[4],
error: color_list[8],
comment: color_list[10],
end: color_list[7],
};
}
function construct_scheme_complementary(label, background, color_list) {
return {
name: label,
preferred_background: background,
colors: color_list,
command: color_list[0],
quote: color_list[4],
param: color_list[3],
autosuggestion: color_list[2],
redirection: color_list[6],
error: color_list[5],
comment: color_list[8],
end: color_list[9],
};
}
function construct_color_scheme_mono(label, background, from_end) {
var mono_colors = ['000000', '121212', '1c1c1c', '262626', '303030', '3a3a3a', '444444', '4e4e4e', '585858', '5f5f5f', '626262', '6c6c6c', '767676', '808080', '878787', '8a8a8a', '949494', '9e9e9e', 'a8a8a8', 'afafaf', 'b2b2b2', 'bcbcbc', 'c6c6c6', 'd0d0d0', 'd7d7d7', 'dadada', 'e4e4e4', 'eeeeee', 'ffffff'];
if (from_end) mono_colors.reverse();
return {
name: label,
preferred_background: background,
colors: mono_colors,
autosuggestion: '777777',
command: mono_colors[0],
comment: mono_colors[7],
end: mono_colors[12],
error: mono_colors[20],
param: mono_colors[4],
quote: mono_colors[10],
redirection: mono_colors[15]
};
}
var additional_color_schemes = [
construct_scheme_analogous('Snow Day', 'white', ['164CC9', '325197', '072D83', '4C7AE4', '7596E4', '4319CC', '4C3499', '260885', '724EE5', '9177E5', '02BDBD', '248E8E', '007B7B', '39DEDE', '65DEDE']),
construct_scheme_analogous('Lava', '#232323', ['FF9400', 'BF8330', 'A66000', 'FFAE40', 'FFC473', 'FFC000', 'BF9C30', 'A67D00', 'FFD040', 'FFDD73', 'FF4C00', 'BF5B30', 'A63100', 'FF7940', 'FF9D73']),
construct_scheme_analogous('Seaweed', '#232323', ['00BF32', '248F40', '007C21', '38DF64', '64DF85', '04819E', '206676', '015367', '38B2CE', '60B9CE', '8EEB00', '7CB02C', '5C9900', 'ACF53D', 'C0F56E']),
construct_scheme_triad('Fairground', '#003', ['0772A1', '225E79', '024A68', '3BA3D0', '63AFD0', 'D9005B', 'A3295C', '8D003B', 'EC3B86', 'EC6AA1', 'FFE100', 'BFAE30', 'A69200', 'FFE840', 'FFEE73']),
construct_scheme_complementary('Bay Cruise', 'black', ['009999', '1D7373', '006363', '33CCCC', '5CCCCC', 'FF7400', 'BF7130', 'A64B00', 'FF9640', 'FFB273']),
{
'name': 'Old School',
'preferred_background': 'black',
colors: ['00FF00', '30BE30', '00A400', '44FF44', '7BFF7B', 'FF0000', 'BE3030', 'A40000', 'FF7B7B', '777777', 'CCCCCC'],
autosuggestion: '777777',
command: '00FF00',
comment: '30BE30',
end: 'FF7B7B',
error: 'A40000',
param: '30BE30',
quote: '44FF44',
redirection: '7BFF7B'
},
{
'name': 'Just a Touch',
'preferred_background': 'black',
colors: ['B0B0B0', '969696', '789276', 'F4F4F4', 'A0A0F0', '666A80', 'F0F0F0', 'D7D7D7', 'B7B7B7', 'FFA779', 'FAFAFA'],
autosuggestion: '9C9C9C',
command: 'F4F4F4',
comment: 'B0B0B0',
end: '969696',
error: 'FFA779',
param: 'A0A0F0',
quote: '666A80',
redirection: 'FAFAFA'
},
{
'name': 'Dracula',
'preferred_background': '#282a36',
colors: ['282A36', '44475A', 'F8F8F2', '6272A4', '8BE9FD', '50FA7B', 'FFB86C', 'FF79C6', 'BD93F9', 'FF5555', 'F1FA8C'],
autosuggestion: 'BD93F9',
command: 'F8F8F2',
comment: '6272A4',
end: '50FA7B',
error: 'FFB86C',
param: 'FF79C6',
quote: 'F1FA8C',
redirection: '8BE9FD'
},
construct_color_scheme_mono('Mono Lace', 'white', false),
construct_color_scheme_mono('Mono Smoke', 'black', true)
];