aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-09-14 19:43:23 +0200
committerHampusM <hampus@hampusmat.com>2022-09-14 19:43:23 +0200
commitad7d5b5d8c33720ce3727228bcb2626957235d53 (patch)
treee697688e437f4331eeb474a31e11ab18d6d5e923
parentc102ca7093c5221ee3672bec164723514e601b31 (diff)
refactor: remove the light and mirage variants
-rw-r--r--README.md3
-rw-r--r--autoload/airline/themes/ayu.vim82
-rw-r--r--autoload/lightline/colorscheme/ayu.vim26
-rw-r--r--colors/ayu.vim105
4 files changed, 87 insertions, 129 deletions
diff --git a/README.md b/README.md
index a5592a0..f3eec14 100644
--- a/README.md
+++ b/README.md
@@ -10,9 +10,6 @@ A continuation of the [Ayu-Vim project](https://github.com/ayu-theme/ayu-vim).
Plug 'https://git.hampusmat.com/ayu-vim' " or other package manager
"...
set termguicolors " enable true colors support
-let ayucolor="light" " for light version of theme
-let ayucolor="mirage" " for mirage version of theme
-let ayucolor="dark" " for dark version of theme
colorscheme ayu
```
diff --git a/autoload/airline/themes/ayu.vim b/autoload/airline/themes/ayu.vim
index 2818f77..42673fa 100644
--- a/autoload/airline/themes/ayu.vim
+++ b/autoload/airline/themes/ayu.vim
@@ -3,50 +3,26 @@
" Let's store all the colors in a dictionary.
let s:c = {}
-let s:ayucolor = get(g:, 'ayucolor', 'dark')
-
-if s:ayucolor == 'light'
- " Base colors.
- let s:c.base0 = { 'gui': '#EAEAEA', 'cterm': 0 }
- let s:c.base1 = { 'gui': '#FAFAFA', 'cterm': 8 }
- let s:c.base2 = { 'gui': '#FAFAFA', 'cterm': 10 }
- let s:c.base3 = { 'gui': '#FAFAFA', 'cterm': 12 }
- let s:c.base4 = { 'gui': '#313d46', 'cterm': 11 }
- let s:c.base5 = { 'gui': '#EF7E46', 'cterm': 14 }
- let s:c.base6 = { 'gui': '#FAFAFA', 'cterm': 7 }
- let s:c.base7 = { 'gui': '#465764', 'cterm': 15 }
-
- " Other colors.
- let s:c.red = { 'gui': '#FF3333', 'cterm': 1 }
- let s:c.orange = { 'gui': '#FF7733', 'cterm': 9 }
- let s:c.yellow = { 'gui': '#E7C547', 'cterm': 3 }
- let s:c.magenta = { 'gui': '#F07178', 'cterm': 13 }
- let s:c.violet = { 'gui': '#A37ACC', 'cterm': 5 }
- let s:c.blue = { 'gui': '#36A3D9', 'cterm': 4 }
- let s:c.cyan = { 'gui': '#95E6CB', 'cterm': 6 }
- let s:c.green = { 'gui': '#B8CC52', 'cterm': 2 }
-
-else
- " Base colors.
- let s:c.base0 = { 'gui': '#151a1e', 'cterm': 0 }
- let s:c.base1 = { 'gui': '#1c2328', 'cterm': 8 }
- let s:c.base2 = { 'gui': '#232b32', 'cterm': 10 }
- let s:c.base3 = { 'gui': '#2a343c', 'cterm': 12 }
- let s:c.base4 = { 'gui': '#313d46', 'cterm': 11 }
- let s:c.base5 = { 'gui': '#384550', 'cterm': 14 }
- let s:c.base6 = { 'gui': '#3f4e5a', 'cterm': 7 }
- let s:c.base7 = { 'gui': '#465764', 'cterm': 15 }
-
- " Other colors.
- let s:c.red = { 'gui': '#FF3333', 'cterm': 1 }
- let s:c.orange = { 'gui': '#FF7733', 'cterm': 9 }
- let s:c.yellow = { 'gui': '#E7C547', 'cterm': 3 }
- let s:c.magenta = { 'gui': '#F07178', 'cterm': 13 }
- let s:c.violet = { 'gui': '#A37ACC', 'cterm': 5 }
- let s:c.blue = { 'gui': '#36A3D9', 'cterm': 4 }
- let s:c.cyan = { 'gui': '#95E6CB', 'cterm': 6 }
- let s:c.green = { 'gui': '#B8CC52', 'cterm': 2 }
-endif
+" Base colors.
+let s:c.base0 = { 'gui': '#151a1e', 'cterm': 0 }
+let s:c.base1 = { 'gui': '#1c2328', 'cterm': 8 }
+let s:c.base2 = { 'gui': '#232b32', 'cterm': 10 }
+let s:c.base3 = { 'gui': '#2a343c', 'cterm': 12 }
+let s:c.base4 = { 'gui': '#313d46', 'cterm': 11 }
+let s:c.base5 = { 'gui': '#384550', 'cterm': 14 }
+let s:c.base6 = { 'gui': '#3f4e5a', 'cterm': 7 }
+let s:c.base7 = { 'gui': '#465764', 'cterm': 15 }
+
+" Other colors.
+let s:c.red = { 'gui': '#FF3333', 'cterm': 1 }
+let s:c.orange = { 'gui': '#FF7733', 'cterm': 9 }
+let s:c.yellow = { 'gui': '#E7C547', 'cterm': 3 }
+let s:c.magenta = { 'gui': '#F07178', 'cterm': 13 }
+let s:c.violet = { 'gui': '#A37ACC', 'cterm': 5 }
+let s:c.blue = { 'gui': '#36A3D9', 'cterm': 4 }
+let s:c.cyan = { 'gui': '#95E6CB', 'cterm': 6 }
+let s:c.green = { 'gui': '#B8CC52', 'cterm': 2 }
+
let g:airline#themes#ayu#palette = {}
" Just remember:
@@ -83,11 +59,7 @@ let g:airline#themes#ayu#palette.normal_modified = {
" Colors.
let s:I1 = s:Array('base2', 'green')
-if s:ayucolor == 'light'
- let s:I2 = s:Array('orange', 'base3')
-else
- let s:I2 = s:Array('base6', 'base3')
-endif
+let s:I2 = s:Array('base6', 'base3')
let s:I3 = s:Array('blue', 'base1')
" Override for when increased contrast is enabled
@@ -115,11 +87,7 @@ let g:airline#themes#ayu#palette.insert_paste = {
" Colors.
let s:R1 = s:Array('base2', 'orange')
-if s:ayucolor == 'light'
- let s:R2 = s:Array('orange', 'base3')
-else
- let s:R2 = s:Array('base6', 'base3')
-endif
+let s:R2 = s:Array('base6', 'base3')
let s:R3 = s:Array('blue', 'base1')
let g:airline#themes#ayu#palette.replace =
@@ -136,11 +104,7 @@ let g:airline#themes#ayu#palette.replace_modified = {
" Colors.
let s:V1 = s:Array('base2', 'magenta')
-if s:ayucolor == 'light'
- let s:V2 = s:Array('orange', 'base3')
-else
- let s:V2 = s:Array('base6', 'base3')
-endif
+let s:V2 = s:Array('base6', 'base3')
let s:V3 = s:N3
let g:airline#themes#ayu#palette.visual =
diff --git a/autoload/lightline/colorscheme/ayu.vim b/autoload/lightline/colorscheme/ayu.vim
index ae528b4..90ab6aa 100644
--- a/autoload/lightline/colorscheme/ayu.vim
+++ b/autoload/lightline/colorscheme/ayu.vim
@@ -1,20 +1,18 @@
-let s:style = get(g:, 'ayucolor', 'dark')
-
let s:fg = {}
-let s:fg.primary = {'dark': '#E6E1CF', 'light': '#5C6773', 'mirage': '#D9D7CE'}[s:style]
-let s:fg.secondary = {'dark': '#14191F', 'light': '#F0F0F0', 'mirage': '#232838'}[s:style]
-let s:fg.contrast = {'dark': '#C2D94C', 'light': '#86B300', 'mirage': '#BAE67E'}[s:style]
-let s:fg.warning = {'dark': '#FFBD54', 'light': '#F2AE49', 'mirage': '#FFDF80'}[s:style]
-let s:fg.error = {'dark': '#FF3333', 'light': '#FFF333', 'mirage': '#FF3333'}[s:style]
+let s:fg.primary = '#E6E1CF'
+let s:fg.secondary = '#14191F'
+let s:fg.contrast = '#C2D94C'
+let s:fg.warning = '#FFBD54'
+let s:fg.error = '#FF3333'
let s:bg = {}
-let s:bg.primary = {'dark': '#161F2A', 'light': '#DEE8F1', 'mirage': '#2A3546'}[s:style]
-let s:bg.secondary = {'dark': '#14191F', 'light': '#F0F0F0', 'mirage': '#232838'}[s:style]
-let s:bg.contrast = {'dark': '#E6B450', 'light': '#FF9940', 'mirage': '#FFCC66'}[s:style]
-let s:bg.normal = {'dark': '#01060E', 'light': '#D3D5D7', 'mirage': '#141925'}[s:style]
-let s:bg.insert = {'dark': '#39BAE6', 'light': '#55B4D4', 'mirage': '#5CCFE6'}[s:style]
-let s:bg.replace = {'dark': '#FF8F40', 'light': '#FA8D3E', 'mirage': '#FFA759'}[s:style]
-let s:bg.visual = {'dark': '#A37ACC', 'light': '#A37ACC', 'mirage': '#D4BFFF'}[s:style]
+let s:bg.primary = '#161F2A'
+let s:bg.secondary = '#14191F'
+let s:bg.contrast = '#E6B450'
+let s:bg.normal = '#01060E'
+let s:bg.insert = '#39BAE6'
+let s:bg.replace = '#FF8F40'
+let s:bg.visual = '#A37ACC'
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
let s:p.normal.left = [[s:fg.primary, s:bg.normal], [s:fg.primary, s:bg.primary]]
diff --git a/colors/ayu.vim b/colors/ayu.vim
index 6029c1a..40492c8 100644
--- a/colors/ayu.vim
+++ b/colors/ayu.vim
@@ -5,7 +5,6 @@ if exists("syntax_on")
syntax reset
endif
-let s:style = get(g:, 'ayucolor', 'dark')
let g:colors_name = "ayu"
"}}}
@@ -14,29 +13,29 @@ let g:colors_name = "ayu"
let s:palette = {}
-let s:palette.bg = {'dark': "#0F1419", 'light': "#FAFAFA", 'mirage': "#212733"}
-
-let s:palette.comment = {'dark': "#7A8999", 'light': "#ABB0B6", 'mirage': "#5C6773"}
-let s:palette.markup = {'dark': "#F07178", 'light': "#F07178", 'mirage': "#F07178"}
-let s:palette.constant = {'dark': "#FFEE99", 'light': "#A37ACC", 'mirage': "#D4BFFF"}
-let s:palette.operator = {'dark': "#E7C547", 'light': "#E7C547", 'mirage': "#80D4FF"}
-let s:palette.tag = {'dark': "#36A3D9", 'light': "#36A3D9", 'mirage': "#5CCFE6"}
-let s:palette.regexp = {'dark': "#95E6CB", 'light': "#4CBF99", 'mirage': "#95E6CB"}
-let s:palette.string = {'dark': "#B8CC52", 'light': "#86B300", 'mirage': "#BBE67E"}
-let s:palette.function = {'dark': "#FFB454", 'light': "#F29718", 'mirage': "#FFD57F"}
-let s:palette.special = {'dark': "#E6B673", 'light': "#E6B673", 'mirage': "#FFC44C"}
-let s:palette.keyword = {'dark': "#FF7733", 'light': "#FF7733", 'mirage': "#FFAE57"}
-let s:palette.info = {'dark': "#6C36D8"}
-let s:palette.nogo = {'dark': "#670000"}
-
-let s:palette.error = {'dark': "#FF3333", 'light': "#FF3333", 'mirage': "#FF3333"}
-let s:palette.accent = {'dark': "#F29718", 'light': "#FF6A00", 'mirage': "#FFCC66"}
-let s:palette.panel = {'dark': "#14191F", 'light': "#FFFFFF", 'mirage': "#272D38"}
-let s:palette.guide = {'dark': "#2D3640", 'light': "#D9D8D7", 'mirage': "#3D4751"}
-let s:palette.line = {'dark': "#151A1E", 'light': "#F3F3F3", 'mirage': "#242B38"}
-let s:palette.selection = {'dark': "#253340", 'light': "#F0EEE4", 'mirage': "#343F4C"}
-let s:palette.fg = {'dark': "#E6E1CF", 'light': "#5C6773", 'mirage': "#D9D7CE"}
-let s:palette.fg_idle = {'dark': "#3E4B59", 'light': "#828C99", 'mirage': "#607080"}
+let s:palette.bg = "#0F1419"
+
+let s:palette.comment = "#7A8999"
+let s:palette.markup = "#F07178"
+let s:palette.constant = "#FFEE99"
+let s:palette.operator = "#E7C547"
+let s:palette.tag = "#36A3D9"
+let s:palette.regexp = "#95E6CB"
+let s:palette.string = "#B8CC52"
+let s:palette.function = "#FFB454"
+let s:palette.special = "#E6B673"
+let s:palette.keyword = "#FF7733"
+let s:palette.info = "#6C36D8"
+let s:palette.nogo = "#670000"
+
+let s:palette.error = "#FF3333"
+let s:palette.accent = "#F29718"
+let s:palette.panel = "#14191F"
+let s:palette.guide = "#2D3640"
+let s:palette.line = "#151A1E"
+let s:palette.selection = "#253340"
+let s:palette.fg = "#E6E1CF"
+let s:palette.fg_idle = "#3E4B59"
"}}}
@@ -45,7 +44,7 @@ let s:palette.fg_idle = {'dark': "#3E4B59", 'light': "#828C99", 'mirage': "#
function! s:build_prim(hi_elem, field)
let l:vname = "s:" . a:hi_elem . "_" . a:field " s:bg_gray
- let l:gui_assign = "gui".a:hi_elem."=".s:palette[a:field][s:style] " guibg=...
+ let l:gui_assign = "gui".a:hi_elem."=".s:palette[a:field] " guibg=...
exe "let " . l:vname . " = ' " . l:gui_assign . "'"
endfunction
@@ -130,9 +129,9 @@ exe "hi! Visual" .s:fg_none .s:bg_selection .s:fmt_none
exe "hi! WarningMsg" .s:fg_error .s:bg_none .s:fmt_none
" Tab line
-exe "hi! TabLineFill " . "guifg=" . s:palette["panel"][s:style] . " guibg=" . s:palette["fg"][s:style] . " gui=reverse"
-exe "hi! TabLine " . "guifg=" . s:palette["panel"][s:style] . " guibg=" . s:palette["fg_idle"][s:style] . " gui=reverse"
-exe "hi! TabLineSel " . "guifg=" . s:palette["panel"][s:style] . " guibg=" . s:palette["fg"][s:style] . " gui=reverse"
+exe "hi! TabLineFill " . "guifg=" . s:palette["panel"] . " guibg=" . s:palette["fg"] . " gui=reverse"
+exe "hi! TabLine " . "guifg=" . s:palette["panel"] . " guibg=" . s:palette["fg_idle"] . " gui=reverse"
+exe "hi! TabLineSel " . "guifg=" . s:palette["panel"] . " guibg=" . s:palette["fg"] . " gui=reverse"
" TODO LongLineWarning to use variables instead of hardcoding
hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
@@ -201,33 +200,33 @@ exe "hi! CursorLineConceal" .s:fg_guide .s:bg_line .s:fmt_none
" Terminal
" ---------
if has("nvim")
- let g:terminal_color_0 = s:palette.bg[s:style]
- let g:terminal_color_1 = s:palette.markup[s:style]
- let g:terminal_color_2 = s:palette.string[s:style]
- let g:terminal_color_3 = s:palette.accent[s:style]
- let g:terminal_color_4 = s:palette.tag[s:style]
- let g:terminal_color_5 = s:palette.constant[s:style]
- let g:terminal_color_6 = s:palette.regexp[s:style]
+ let g:terminal_color_0 = s:palette.bg
+ let g:terminal_color_1 = s:palette.markup
+ let g:terminal_color_2 = s:palette.string
+ let g:terminal_color_3 = s:palette.accent
+ let g:terminal_color_4 = s:palette.tag
+ let g:terminal_color_5 = s:palette.constant
+ let g:terminal_color_6 = s:palette.regexp
let g:terminal_color_7 = "#FFFFFF"
- let g:terminal_color_8 = s:palette.fg_idle[s:style]
- let g:terminal_color_9 = s:palette.error[s:style]
- let g:terminal_color_10 = s:palette.string[s:style]
- let g:terminal_color_11 = s:palette.accent[s:style]
- let g:terminal_color_12 = s:palette.tag[s:style]
- let g:terminal_color_13 = s:palette.constant[s:style]
- let g:terminal_color_14 = s:palette.regexp[s:style]
- let g:terminal_color_15 = s:palette.comment[s:style]
+ let g:terminal_color_8 = s:palette.fg_idle
+ let g:terminal_color_9 = s:palette.error
+ let g:terminal_color_10 = s:palette.string
+ let g:terminal_color_11 = s:palette.accent
+ let g:terminal_color_12 = s:palette.tag
+ let g:terminal_color_13 = s:palette.constant
+ let g:terminal_color_14 = s:palette.regexp
+ let g:terminal_color_15 = s:palette.comment
let g:terminal_color_background = g:terminal_color_0
- let g:terminal_color_foreground = s:palette.fg[s:style]
+ let g:terminal_color_foreground = s:palette.fg
else
- let g:terminal_ansi_colors = [s:palette.bg[s:style], s:palette.markup[s:style]]
- let g:terminal_ansi_colors += [s:palette.string[s:style], s:palette.accent[s:style]]
- let g:terminal_ansi_colors += [s:palette.tag[s:style], s:palette.constant[s:style]]
- let g:terminal_ansi_colors += [s:palette.regexp[s:style], "#FFFFFF"]
- let g:terminal_ansi_colors += [s:palette.fg_idle[s:style], s:palette.error[s:style]]
- let g:terminal_ansi_colors += [s:palette.string[s:style], s:palette.accent[s:style]]
- let g:terminal_ansi_colors += [s:palette.tag[s:style], s:palette.constant[s:style]]
- let g:terminal_ansi_colors += [s:palette.regexp[s:style], s:palette.comment[s:style]]
+ let g:terminal_ansi_colors = [s:palette.bg, s:palette.markup]
+ let g:terminal_ansi_colors += [s:palette.string, s:palette.accent]
+ let g:terminal_ansi_colors += [s:palette.tag, s:palette.constant]
+ let g:terminal_ansi_colors += [s:palette.regexp, "#FFFFFF"]
+ let g:terminal_ansi_colors += [s:palette.fg_idle, s:palette.error]
+ let g:terminal_ansi_colors += [s:palette.string, s:palette.accent]
+ let g:terminal_ansi_colors += [s:palette.tag, s:palette.constant]
+ let g:terminal_ansi_colors += [s:palette.regexp, s:palette.comment]
endif
@@ -278,7 +277,7 @@ hi! link diffAdded String
"
" This is needed for some reason: {{{
-let &background = s:style
+let &background = "dark"
" }}}