Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Heavenser committed Oct 9, 2020
1 parent 536b98c commit e77933e
Show file tree
Hide file tree
Showing 4 changed files with 313 additions and 0 deletions.
42 changes: 42 additions & 0 deletions autoload/SpaceVim/mapping/guide/theme/4seasons.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
" 4seasons Vim color scheme for SpaceVim statusline
"
" Name: 4seasons
" Author: Heavenser Lee <[email protected]>
" Version: 1.0.0
" Release: 2020-10-09 12:00:21 +0800
" License: BSD 2-clause License

" the theme colors should be
" [
" \ [ a_guifg, a_guibg, a_ctermfg, a_ctermbg],
" \ [ b_guifg, b_guibg, b_ctermfg, b_ctermbg],
" \ [ c_guifg, c_guibg, c_ctermfg, c_ctermbg],
" \ [ z_guibg, z_ctermbg],
" \ [ i_guifg, i_guibg, i_ctermfg, i_ctermbg],
" \ [ v_guifg, v_guibg, v_ctermfg, v_ctermbg],
" \ [ r_guifg, r_guibg, r_ctermfg, r_ctermbg],
" \ [ ii_guifg, ii_guibg, ii_ctermfg, ii_ctermbg],
" \ [ in_guifg, in_guibg, in_ctermfg, in_ctermbg],
" \ ]
" group_a: window id
" group_b/group_c: stausline sections
" group_z: empty area
" group_i: window id in insert mode
" group_v: window id in visual mode
" group_r: window id in select mode
" group_ii: window id in iedit-insert mode
" group_in: windows id in iedit-normal mode

function! SpaceVim#mapping#guide#theme#4seasons#palette() abort
return [
\ ['#ffffd7' , '#005faf' , 230, 25],
\ ['#767676' , '#000000' , 243 , 255],
\ ['#a8a8a8' , '#444444' , 248 , 238],
\ ['#444444', 238],
\ ['#262626', '#00d7af', 235, 43],
\ ['#262626', '#ffd700', 235, 220],
\ ['#ffffd7', '#ff5f87', 230, 204],
\ ['#262626', '#5fd75f', 235, 77],
\ ['#262626', '#ffafaf', 235, 217],
\ ]
endfunction
116 changes: 116 additions & 0 deletions autoload/airline/themes/4seasons.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
" 4seasons Vim color scheme for airline
"
" Name: 4seasons
" Author: Heavenser Lee <[email protected]>
" Version: 1.0.0
" Release: 2020-10-09 12:00:21 +0800
" License: BSD 2-clause License

scriptencoding utf-8

" Each theme is contained in its own file and declares variables scoped to the
" file. These variables represent the possible "modes" that airline can
" detect. The mode is the return value of mode(), which gets converted to a
" readable string. The following is a list currently supported modes: normal,
" insert, replace, visual, and inactive.
"
" Each mode can also have overrides. These are small changes to the mode that
" don't require a completely different look. "modified" and "paste" are two
" such supported overrides. These are simply suffixed to the major mode,
" separated by an underscore. For example, "normal_modified" would be normal
" mode where the current buffer is modified.
"
" The theming algorithm is a 2-pass system where the mode will draw over all
" parts of the statusline, and then the override is applied after. This means
" it is possible to specify a subset of the theme in overrides, as it will
" simply overwrite the previous colors. If you want simultaneous overrides,
" then they will need to change different parts of the statusline so they do
" not conflict with each other.
"
" First, let's define an empty dictionary and assign it to the "palette"
" variable. The # is a separator that maps with the directory structure. If
" you get this wrong, Vim will complain loudly.
let g:airline#themes#4seasons#palette = {}

" First let's define some arrays. The s: is just a VimL thing for scoping the
" variables to the current script. Without this, these variables would be
" declared globally. Now let's declare some colors for normal mode and add it
" to the dictionary. The array is in the format:
" [ guifg, guibg, ctermfg, ctermbg, opts ]. See "help attr-list" for valid
" values for the "opt" value.
let s:N1 = [ '#cfcfc2' , '#005faf' , 17 , 190 ]
let s:N2 = [ '#7a7c7d' , '#232629' , 255 , 238 ]
let s:N3 = [ '#a5a6a8' , '#31363b' , 85 , 234 ]
let g:airline#themes#4seasons#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)

" Here we define overrides for when the buffer is modified. This will be
" applied after g:airline#themes#4seasons#palette.normal, hence why only certain keys are
" declared.
" let g:airline#themes#4seasons#palette.normal_modified = {
" \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] ,
" \ }


let s:I1 = [ '#cfcfc2' , '#00d7af' , 17 , 190 ]
let s:I2 = [ '#7a7c7d' , '#232629' , 255 , 238 ]
let s:I3 = [ '#a5a6a8' , '#31363b' , 85 , 234 ]
let g:airline#themes#4seasons#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
" let g:airline#themes#4seasons#palette.insert_modified = {
" \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] ,
" \ }
" let g:airline#themes#4seasons#palette.insert_paste = {
" \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] ,
" \ }


let s:R1 = [ '#cfcfc2' , '#ff5f87' , 17 , 190 ]
let s:R2 = [ '#7a7c7d' , '#232629' , 255 , 238 ]
let s:R3 = [ '#a5a6a8' , '#31363b' , 85 , 234 ]
let g:airline#themes#4seasons#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
" let g:airline#themes#4seasons#palette.replace = copy(g:airline#themes#4seasons#palette.insert)
" let g:airline#themes#4seasons#palette.replace.airline_a = [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ]
" let g:airline#themes#4seasons#palette.replace_modified = g:airline#themes#4seasons#palette.insert_modified


let s:V1 = [ '#cfcfc2' , '#ffd700' , 17 , 190 ]
let s:V2 = [ '#7a7c7d' , '#232629' , 255 , 238 ]
let s:V3 = [ '#a5a6a8' , '#31363b' , 85 , 234 ]
let g:airline#themes#4seasons#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
" let g:airline#themes#4seasons#palette.visual_modified = {
" \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] ,
" \ }


let s:IA1 = [ '#7a7c7d' , '#31363b' , 239 , 234 , '' ]
let s:IA2 = [ '#7a7c7d' , '#31363b' , 239 , 235 , '' ]
let s:IA3 = [ '#7a7c7d' , '#31363b' , 239 , 236 , '' ]
let g:airline#themes#4seasons#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
" let g:airline#themes#4seasons#palette.inactive_modified = {
" \ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] ,
" \ }


" Accents are used to give parts within a section a slightly different look or
" color. Here we are defining a "red" accent, which is used by the 'readonly'
" part by default. Only the foreground colors are specified, so the background
" colors are automatically extracted from the underlying section colors. What
" this means is that regardless of which section the part is defined in, it
" will be red instead of the section's foreground color. You can also have
" multiple parts with accents within a section.
let g:airline#themes#4seasons#palette.accents = {
\ 'red': [ '#f44f4f' , '' , 160 , '' ]
\ }


" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp
" variable so that related functionality is loaded iff the user is using
" ctrlp. Note that this is optional, and if you do not define ctrlp colors
" they will be chosen automatically from the existing palette.
" if !get(g:, 'loaded_ctrlp', 0)
" finish
" endif
" let g:airline#themes#4seasons#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(
" \ [ '#d7d7ff' , '#5f00af' , 189 , 55 , '' ],
" \ [ '#ffffff' , '#875fd7' , 231 , 98 , '' ],
" \ [ '#5f00af' , '#ffffff' , 55 , 231 , 'bold' ])

39 changes: 39 additions & 0 deletions autoload/lightline/colorscheme/4seasons.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
" 4seasons Vim color scheme for lightline
"
" Name: 4seasons
" Author: Heavenser Lee <[email protected]>
" Version: 1.0.0
" Release: 2020-10-09 12:00:21 +0800
" License: BSD 2-clause License

let s:dark = '#262626'
let s:light = '#dadada'
let s:linenr_bg = '#444444'
let s:comment = '#767676'
let s:clinenr_fg = '#a8a8a8'
let s:red = '#ff5f87'
let s:yellow = '#ffd700'
let s:green = '#00d7af'
let s:blue = '#005faf'
let s:error = '#ff0000'

let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}

let s:p.normal.left = [ [ s:light, s:blue ], [ s:comment, s:dark ] ]
let s:p.normal.right = [ [ s:light, s:blue ], [ s:comment, s:dark ] ]
let s:p.inactive.right = [ [ s:comment, s:linenr_bg ], [ s:comment, s:linenr_bg ] ]
let s:p.inactive.left = [ [ s:comment, s:linenr_bg ], [ s:comment, s:linenr_bg ] ]
let s:p.insert.left = [ [ s:light, s:green ], [ s:comment, s:dark ] ]
let s:p.replace.left = [ [ s:light, s:red ], [ s:comment, s:dark ] ]
let s:p.visual.left = [ [ s:light, s:yellow ], [ s:comment, s:dark ] ]

let s:p.normal.middle = [ [ s:clinenr_fg, s:linenr_bg ] ]
let s:p.inactive.middle = [ [ s:comment, s:linenr_bg ] ]
let s:p.tabline.left = [ [ s:comment, s:linenr_bg ] ]
let s:p.tabline.tabsel = [ [ s:light, s:blue ] ]
let s:p.tabline.middle = [ [ s:light, s:linenr_bg ] ]
let s:p.tabline.right = [ [ s:light, s:blue ], [ s:comment, s:dark ] ]
let s:p.normal.error = [ [ s:error, s:linenr_bg ] ]
let s:p.normal.warning = [ [ s:light, s:linenr_bg ] ]

let g:lightline#colorscheme#4seasons#palette = lightline#colorscheme#fill(s:p)
116 changes: 116 additions & 0 deletions colors/4seasons.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
" 4seasons Vim color scheme
"
" Name: 4seasons
" Author: Heavenser Lee <[email protected]>
" Version: 1.0.0
" Release: 2020-10-09 12:00:21 +0800
" License: BSD 2-clause License

highlight clear

if exists("syntax_on")
syntax reset
endif

let g:colors_name = "4seasons"
let s:config = {}
let s:config.colors = &t_Co

let s:config.plain = "term=NONE cterm=NONE gui=NONE"
let s:config.bold = "term=bold cterm=bold gui=bold"
let s:config.emphasis = "term=italic cterm=italic gui=italic"
let s:config.underline = "term=underline cterm=underline gui=underline"

let s:color01 = { 'cterm': '255' , 'gui': '#ffffd7' }
let s:color02 = { 'cterm': '247' , 'gui': '#9e9e9e' }
let s:color03 = { 'cterm': '236' , 'gui': '#303030' }
let s:color04 = { 'cterm': '232' , 'gui': '#080808' }
let s:color05 = { 'cterm': '25' , 'gui': '#005faf' }
let s:color06 = { 'cterm': '43' , 'gui': '#00d7af' }
let s:color07 = { 'cterm': '77' , 'gui': '#5fd75f' }
let s:color08 = { 'cterm': '118' , 'gui': '#afff00' }
let s:color09 = { 'cterm': '226' , 'gui': '#ffdf00' }
let s:color10 = { 'cterm': '220' , 'gui': '#ffd700' }
let s:color11 = { 'cterm': '202' , 'gui': '#ff5f00' }
let s:color12 = { 'cterm': '160' , 'gui': '#df0000' }
let s:color13 = { 'cterm': '204' , 'gui': '#ff5f87' }
let s:color14 = { 'cterm': '217' , 'gui': '#ffafaf' }
let s:color15 = { 'cterm': '180' , 'gui': '#d7af87' }

execute "highlight Boolean ".s:config.plain." ctermfg=".s:color06.cterm." ctermbg=NONE guifg=".s:color06.gui ." guibg=NONE"
execute "highlight Character ".s:config.plain." ctermfg=".s:color06.cterm." ctermbg=NONE guifg=".s:color06.gui ." guibg=NONE"
execute "highlight Comment ".s:config.plain." ctermfg=".s:color02.cterm ." ctermbg=NONE guifg=".s:color02.gui ." guibg=NONE"
execute "highlight Constant ".s:config.plain." ctermfg=".s:color06.cterm." ctermbg=NONE guifg=".s:color06.gui ." guibg=NONE"
execute "highlight Cursor ".s:config.plain." ctermfg=".s:color04.cterm ." ctermbg=".s:color01.cterm." guifg=".s:color04.gui ." guibg=".s:color01.gui
execute "highlight CursorColumn ".s:config.plain." ctermfg=NONE ctermbg=".s:color03.cterm ." guifg=NONE guibg=".s:color03.gui
execute "highlight CursorLine ".s:config.plain." ctermfg=NONE ctermbg=".s:color03.cterm ." guifg=NONE guibg=".s:color03.gui
execute "highlight CursorLineNr ".s:config.plain." ctermfg=".s:color10.cterm ." ctermbg=NONE guifg=".s:color10.gui ." guibg=NONE"
execute "highlight DiffAdd ".s:config.plain." ctermfg=".s:color08.cterm ." ctermbg=NONE guifg=".s:color08.gui ." guibg=NONE"
execute "highlight DiffChange ".s:config.plain." ctermfg=".s:color09.cterm ." ctermbg=NONE guifg=".s:color09.gui ." guifg=NONE"
execute "highlight DiffDelete ".s:config.plain." ctermfg=".s:color12.cterm ." ctermbg=NONE guifg=".s:color12.gui ." guibg=NONE"
execute "highlight ErrorMsg ".s:config.plain." ctermfg=".s:color12.cterm ." ctermbg=NONE guifg=".s:color12.gui ." guibg=NONE"
execute "highlight Float ".s:config.plain." ctermfg=".s:color07.cterm ." ctermbg=NONE guifg=".s:color07.gui ." guibg=NONE"
execute "highlight Folded ".s:config.plain." ctermfg=".s:color02.cterm ." ctermbg=".s:color03.cterm ." guifg=".s:color02.gui ." guibg=".s:color03.gui
execute "highlight Function ".s:config.plain." ctermfg=".s:color10.cterm ." ctermbg=NONE guifg=".s:color10.gui ." guibg=NONE"
execute "highlight Identifier ".s:config.plain." ctermfg=".s:color06.cterm." ctermbg=NONE guifg=".s:color06.gui ." guibg=NONE"
execute "highlight Include ".s:config.plain." ctermfg=".s:color11.cterm ." ctermbg=NONE guifg=".s:color11.gui ." guibg=NONE"
execute "highlight Keyword ".s:config.plain." ctermfg=".s:color15.cterm ." ctermbg=NONE guifg=".s:color15.gui ." guibg=NONE"
execute "highlight LineNr ".s:config.plain." ctermfg=".s:color02.cterm ." ctermbg=NONE guifg=".s:color02.gui ." guibg=NONE"
execute "highlight ModeMsg ".s:config.plain." ctermfg=".s:color01.cterm." ctermbg=NONE guifg=".s:color01.gui ." guibg=NONE"
execute "highlight MoreMsg ".s:config.plain." ctermfg=".s:color08.cterm ." ctermbg=NONE guifg=".s:color08.gui ." guibg=NONE"
execute "highlight NonText ".s:config.plain." ctermfg=".s:color02.cterm ." ctermbg=NONE guifg=".s:color02.gui ." guibg=NONE"
execute "highlight Normal ".s:config.plain." ctermfg=".s:color01.cterm." ctermbg=NONE guifg=".s:color01.gui ." guibg=NONE"
execute "highlight Number ".s:config.plain." ctermfg=".s:color07.cterm ." ctermbg=NONE guifg=".s:color07.gui ." guibg=NONE"
execute "highlight Operator ".s:config.plain." ctermfg=".s:color14.cterm ." ctermbg=NONE guifg=".s:color14.gui ." guibg=NONE"
execute "highlight Pmenu ".s:config.plain." ctermfg=".s:color02.cterm ." ctermbg=".s:color03.cterm ." guifg=".s:color01.gui ." guibg=".s:color03.gui
execute "highlight PmenuSbar ".s:config.plain." ctermfg=NONE ctermbg=".s:color03.cterm ." guifg=NONE guibg=".s:color02.gui
execute "highlight PmenuSel ".s:config.plain." ctermfg=".s:color03.cterm ." ctermbg=".s:color02.cterm ." guifg=".s:color03.gui ." guibg=".s:color02.gui
execute "highlight PmenuThumb ".s:config.plain." ctermfg=".s:color02.cterm ." ctermbg=NONE guifg=".s:color02.gui ." guibg=NONE"
execute "highlight PreProc ".s:config.plain." ctermfg=".s:color06.cterm." ctermbg=NONE guifg=".s:color06.gui ." guibg=NONE"
execute "highlight SpecialKey ".s:config.plain." ctermfg=".s:color03.cterm ." ctermbg=NONE guifg=".s:color03.gui ." guibg=NONE"
execute "highlight Statement ".s:config.plain." ctermfg=".s:color11.cterm ." ctermbg=NONE guifg=".s:color11.gui ." guibg=NONE"
execute "highlight StatusLine ".s:config.bold ." ctermfg=".s:color03.cterm ." ctermbg=".s:color02.cterm ." guifg=".s:color03.gui ." guibg=".s:color02.gui
execute "highlight StatusLineNC ".s:config.bold ." ctermfg=NONE ctermbg=".s:color03.cterm ." guifg=".s:color02.gui ." guibg=".s:color03.gui
execute "highlight String ".s:config.plain." ctermfg=".s:color07.cterm ." ctermbg=NONE guifg=".s:color07.gui ." guibg=NONE"
execute "highlight Title ".s:config.plain." ctermfg=".s:color02.cterm ." ctermbg=NONE guifg=".s:color02.gui ." guibg=NONE"
execute "highlight Type ".s:config.plain." ctermfg=".s:color13.cterm ." ctermbg=NONE guifg=".s:color13.gui ." guibg=NONE"
execute "highlight VertSplit ".s:config.plain." ctermfg=".s:color02.cterm ." ctermbg=".s:color02.cterm ." guifg=".s:color02.gui ." guibg=".s:color02.gui
execute "highlight Visual ".s:config.plain." ctermfg=".s:color01.cterm." ctermbg=".s:color05.cterm ." guifg=".s:color01.gui ." guibg=".s:color05.gui
execute "highlight VisualNOS ".s:config.plain." ctermfg=NONE ctermbg=".s:color07.cterm ." guifg=NONE guibg=".s:color07.gui
execute "highlight WarningMsg ".s:config.plain." ctermfg=".s:color09.cterm ." ctermbg=NONE guifg=".s:color09.gui ." guibg=NONE"
execute "highlight WildMenu ".s:config.plain." ctermfg=NONE ctermbg=".s:color03.cterm ." guifg=NONE guibg=".s:color03.gui

execute "highlight htmlTitle ".s:config.bold

highlight link xmlTag Statement
highlight link xmlTagName Statement
highlight link xmlEndTag Statement

highlight link htmlTag xmlTag
highlight link htmlTagName xmlTagName
highlight link htmlEndTag xmlEndTag
highlight link htmlH1 htmlTitle

highlight link Conditional Statement
highlight link Repeat Statement
highlight link Label Statement
highlight link Exception Statement
highlight link Define Include
highlight link Macro Include
highlight link PreCondit Include
highlight link StorageClass Type
highlight link Structure Type
highlight link Typedef Type
highlight link Special SpecialKey

highlight link rubyBlockParameter Normal
highlight link rubyClass Normal
highlight link rubyConstant Type
highlight link rubyInstanceVariable Identifier
highlight link rubyInterpolation Operator
highlight link rubyLocalVariableOrMethod Identifier
highlight link rubyPredefinedConstant Type
highlight link rubyPseudoVariable Identifier
highlight link rubyStringDelimiter Operator
highlight link rubyDoBlock Statement
highlight link rubyControl Statement

0 comments on commit e77933e

Please sign in to comment.