├── README.md ├── colors └── scheakur.vim └── source.vim /README.md: -------------------------------------------------------------------------------- 1 | # scheakur.vim 2 | 3 | A light/dark colorscheme for Vim. 4 | 5 | ## Light 6 | 7 | ```vim 8 | set background=light 9 | colorscheme scheakur 10 | ``` 11 | 12 | http://vimcolors.com/252/scheakur/light 13 | 14 | ## Dark 15 | 16 | ```vim 17 | set background=dark 18 | colorscheme scheakur 19 | ``` 20 | 21 | http://vimcolors.com/252/scheakur/dark 22 | -------------------------------------------------------------------------------- /colors/scheakur.vim: -------------------------------------------------------------------------------- 1 | " This file is built by ../source.vim. 2 | " Do not modify this file directly. 3 | highlight clear 4 | if exists('syntax_on') 5 | syntax reset 6 | endif 7 | 8 | let g:colors_name = 'scheakur' 9 | 10 | if &background == 'light' 11 | hi Normal guifg=#2e2e2e guibg=#f0f0e5 gui=none ctermfg=234 ctermbg=255 cterm=none 12 | hi ColorColumn guibg=#dfd6d1 ctermbg=145 13 | hi Comment guifg=#878965 ctermfg=101 14 | hi Conceal guifg=#0c6cc0 guibg=#f0f0e5 gui=none ctermfg=25 ctermbg=188 15 | hi Constant guifg=#00695c ctermfg=23 16 | hi Cursor guibg=#f39812 ctermbg=172 17 | hi CursorColumn guibg=#cce0ef ctermbg=146 18 | hi CursorIM guibg=#4a9f68 ctermbg=65 19 | hi CursorLine guibg=#cce0ef gui=none ctermbg=153 cterm=none 20 | hi CursorLineNr guifg=#567686 guibg=#cce0ef gui=none ctermfg=60 ctermbg=146 21 | hi DiffAdd guibg=#d0ead0 ctermbg=151 22 | hi DiffChange guibg=#fdfec9 ctermbg=229 23 | hi DiffDelete guifg=#ffe3e5 guibg=#ffe3e5 ctermfg=174 ctermbg=174 24 | hi DiffText guibg=#fed910 ctermbg=178 25 | hi Directory guifg=#1177dd ctermfg=25 26 | hi Error guifg=#d1160b guibg=#ffe3e5 ctermfg=124 ctermbg=223 27 | hi ErrorMsg guifg=#d1160b guibg=#ffe3e5 ctermfg=124 ctermbg=223 28 | hi FoldColumn guifg=#04530d guibg=#d0ead0 ctermfg=22 ctermbg=151 29 | hi Folded guifg=#04530d guibg=#d0ead0 ctermfg=22 ctermbg=151 30 | hi Function guifg=#cb1265 ctermfg=125 31 | hi Identifier guifg=#546e7a ctermfg=59 32 | hi Ignore guifg=#666666 ctermfg=240 33 | hi IncSearch guifg=#2e2e2e guibg=#f4b3c2 gui=none ctermfg=234 ctermbg=218 34 | hi LineNr guifg=#567686 guibg=#e2e2d0 ctermfg=236 ctermbg=145 35 | hi MatchParen guifg=#0e8ed3 guibg=#dbf2ff ctermfg=31 ctermbg=152 36 | hi ModeMsg guifg=#337ca3 ctermfg=24 37 | hi MoreMsg guifg=#1e7b3d ctermfg=22 38 | hi NonText guifg=#7878ba gui=none ctermfg=61 39 | hi Operator guifg=#6b118a ctermfg=54 40 | hi Pmenu guifg=#2e2e2e guibg=#f6e4e7 ctermfg=235 ctermbg=231 41 | hi PmenuSbar guifg=#2e2e2e guibg=#f6e4e7 ctermfg=235 ctermbg=231 42 | hi PmenuSel guifg=#2e2e2e guibg=#f4b3c2 gui=none ctermfg=234 ctermbg=218 43 | hi PmenuThumb guifg=#2e2e2e guibg=#f4b3c2 gui=none ctermfg=234 ctermbg=218 44 | hi PreProc guifg=#6b118a ctermfg=54 45 | hi Question guifg=#008080 ctermfg=30 46 | hi Search guifg=#2e2e2e guibg=#e9e7ac ctermfg=235 ctermbg=186 47 | hi SignColumn guifg=#567686 guibg=#e2e2d0 ctermfg=236 ctermbg=145 48 | hi Special guifg=#1041a8 ctermfg=18 49 | hi SpecialKey guifg=#aabbcc ctermfg=109 50 | hi SpellBad guifg=#d1160b guibg=#ffe3e5 gui=undercurl ctermfg=124 ctermbg=223 guisp=#d1160b cterm=underline 51 | hi SpellCap guifg=#1041a8 guibg=#dbf2ff gui=undercurl ctermfg=18 ctermbg=152 guisp=#1041a8 cterm=underline 52 | hi SpellLocal guifg=#4d4214 guibg=#fdfec9 gui=undercurl ctermfg=52 ctermbg=229 guisp=#4d4214 cterm=underline 53 | hi SpellRare guifg=#04530d guibg=#d0ead0 gui=undercurl ctermfg=22 ctermbg=151 guisp=#04530d cterm=underline 54 | hi Statement guifg=#0c6cc0 gui=none ctermfg=25 55 | hi StatusLine guifg=#dcdcdc guibg=#4a4642 gui=none ctermfg=251 ctermbg=237 56 | hi StatusLineNC guifg=#dcdcdc guibg=#7a7672 gui=italic ctermfg=251 ctermbg=242 cterm=none 57 | hi String guifg=#1041a8 ctermfg=18 58 | hi TabLine guifg=#dcdcdc guibg=#4a4642 gui=none ctermfg=251 ctermbg=237 59 | hi TabLineFill guifg=#dcdcdc guibg=#4a4642 gui=none ctermfg=251 ctermbg=237 60 | hi TabLineSel guifg=#4a4642 gui=none ctermfg=237 61 | hi Tag guifg=#a25a09 ctermfg=94 62 | hi Title guifg=#1041a8 gui=none ctermfg=18 63 | hi Todo guifg=#4d4214 guibg=#fdfec9 ctermfg=52 ctermbg=229 64 | hi Type guifg=#00695c gui=none ctermfg=23 65 | hi Underlined guifg=#0c6cc0 ctermfg=25 66 | hi VertSplit guifg=#4a4642 guibg=#4a4642 gui=none ctermfg=237 ctermbg=237 67 | hi Visual guibg=#cce0ef ctermbg=153 68 | hi WarningMsg guifg=#ea6042 ctermfg=166 69 | hi WildMenu guifg=#2e2e2e guibg=#f0f0e5 gui=none ctermfg=234 ctermbg=255 cterm=none 70 | else 71 | hi Normal guifg=#dadad5 guibg=#121713 gui=none ctermfg=255 ctermbg=234 cterm=none 72 | hi ColorColumn guibg=#262f21 ctermbg=235 73 | hi Comment guifg=#707073 ctermfg=241 74 | hi Conceal guifg=#91b5d4 guibg=#121713 gui=none ctermfg=109 ctermbg=233 75 | hi Constant guifg=#70a395 ctermfg=66 76 | hi Cursor guibg=#f39812 ctermbg=172 77 | hi CursorColumn guibg=#23343d ctermbg=235 78 | hi CursorIM guibg=#4a9f68 ctermbg=65 79 | hi CursorLine guibg=#23343d gui=none ctermbg=24 cterm=none 80 | hi CursorLineNr guifg=#7c8884 guibg=#23343d gui=none ctermfg=66 ctermbg=235 81 | hi DiffAdd guibg=#013a06 gui=none ctermfg=71 ctermbg=16 82 | hi DiffChange guibg=#4a4707 ctermfg=178 ctermbg=235 83 | hi DiffDelete guifg=#491008 guibg=#491008 ctermfg=237 ctermbg=237 84 | hi DiffText guifg=#fefd03 guibg=#7b7b00 ctermfg=226 ctermbg=58 85 | hi Directory guifg=#6aaaea ctermfg=68 86 | hi Error guifg=#ff8485 guibg=#121713 ctermfg=174 ctermbg=234 87 | hi ErrorMsg guifg=#ff8485 guibg=#121713 ctermfg=174 ctermbg=234 88 | hi FoldColumn guifg=#a0cab0 guibg=#303a3b ctermfg=109 ctermbg=236 89 | hi Folded guifg=#a0cab0 guibg=#303a3b ctermfg=109 ctermbg=236 90 | hi Function guifg=#d789c8 ctermfg=168 91 | hi Identifier guifg=#91a8a5 ctermfg=102 92 | hi Ignore guifg=#666666 ctermfg=240 93 | hi IncSearch guifg=#dadad5 guibg=#d51487 gui=none ctermfg=251 ctermbg=162 94 | hi LineNr guifg=#7c8884 guibg=#132423 ctermfg=66 ctermbg=234 95 | hi MatchParen guifg=#dadad5 guibg=#088b8c ctermfg=251 ctermbg=30 96 | hi ModeMsg guifg=#6badd1 ctermfg=67 97 | hi MoreMsg guifg=#add581 ctermfg=108 98 | hi NonText guifg=#7878ba gui=none ctermfg=61 99 | hi Operator guifg=#8d89c7 ctermfg=103 100 | hi Pmenu guifg=#dadad5 guibg=#292c2f ctermfg=251 ctermbg=237 101 | hi PmenuSbar guifg=#dadad5 guibg=#292c2f ctermfg=251 ctermbg=237 102 | hi PmenuSel guifg=#dadad5 guibg=#d51487 gui=none ctermfg=251 ctermbg=162 103 | hi PmenuThumb guifg=#dadad5 guibg=#d51487 gui=none ctermfg=251 ctermbg=162 104 | hi PreProc guifg=#8d89c7 ctermfg=103 105 | hi Question guifg=#00a0a0 ctermfg=30 106 | hi Search guifg=#121713 guibg=#c9c73c ctermfg=233 ctermbg=142 107 | hi SignColumn guifg=#7c8884 guibg=#132423 ctermfg=66 ctermbg=234 108 | hi Special guifg=#a7a053 ctermfg=101 109 | hi SpecialKey guifg=#3a4857 ctermfg=59 110 | hi SpellBad guifg=#ff8485 guibg=#121713 gui=undercurl ctermfg=174 ctermbg=233 guisp=#ff8485 cterm=underline 111 | hi SpellCap guifg=#a7a053 guibg=#121713 gui=undercurl ctermfg=101 ctermbg=233 guisp=#a7a053 cterm=underline 112 | hi SpellLocal guifg=#fdfec9 guibg=#121713 gui=undercurl ctermfg=187 ctermbg=233 guisp=#fdfec9 cterm=underline 113 | hi SpellRare guifg=#a0cab0 guibg=#121713 gui=undercurl ctermfg=109 ctermbg=233 guisp=#a0cab0 cterm=underline 114 | hi Statement guifg=#91b5d4 gui=none ctermfg=109 115 | hi StatusLine guifg=#b2b5b2 guibg=#292c2f gui=none ctermfg=247 ctermbg=237 116 | hi StatusLineNC guifg=#727572 guibg=#020508 gui=italic ctermfg=235 ctermbg=232 cterm=none 117 | hi String guifg=#a7a053 ctermfg=101 118 | hi TabLine guifg=#b2b5b2 guibg=#292c2f gui=none ctermfg=247 ctermbg=237 119 | hi TabLineFill guifg=#b2b5b2 guibg=#292c2f gui=none ctermfg=247 ctermbg=237 120 | hi TabLineSel guifg=#d789c8 gui=none ctermfg=139 121 | hi Tag guifg=#d38d6b ctermfg=137 122 | hi Title guifg=#a7a053 gui=none ctermfg=101 123 | hi Todo guifg=#fdfec9 guibg=#4d4214 ctermfg=187 ctermbg=234 124 | hi Type guifg=#5f94ca gui=none ctermfg=67 125 | hi Underlined guifg=#91b5d4 ctermfg=109 126 | hi VertSplit guifg=#292c2f guibg=#292c2f gui=none ctermfg=237 ctermbg=237 127 | hi Visual guibg=#23343d ctermbg=24 128 | hi WarningMsg guifg=#e0b088 ctermfg=144 129 | hi WildMenu guifg=#dadad5 guibg=#121713 gui=none ctermfg=255 ctermbg=234 cterm=none 130 | endif 131 | -------------------------------------------------------------------------------- /source.vim: -------------------------------------------------------------------------------- 1 | " HOW TO BUILD: vim -u source.vim 2 | 3 | set nocompatible 4 | 5 | let s:output = [] 6 | 7 | function! s:print(text) 8 | call add(s:output, a:text) 9 | endfunction 10 | 11 | function! s:writefile(file) 12 | call writefile(s:output, a:file) 13 | endfunction 14 | 15 | " constants 16 | let s:base = '_base_' 17 | " highlighting properties 18 | let s:props = {} 19 | 20 | " functions for highlighting " {{{ 21 | function! s:hi(group, ...) " fg, bg, attr, term_fg, term_bg, term_attr 22 | let s:props[a:group] = a:000 23 | endfunction 24 | 25 | function! s:copy(group, orig_group) 26 | let orig = a:orig_group 27 | call s:hi(a:group, orig, orig, orig, orig, orig, orig) 28 | endfunction 29 | 30 | 31 | function! s:highlight(bg) 32 | if a:bg == 'light' 33 | call s:set_light_colors() 34 | else 35 | call s:set_dark_colors() 36 | endif 37 | call s:set_common_colors() 38 | call s:do_highlight() 39 | let &background = a:bg 40 | endfunction 41 | 42 | 43 | function! s:do_highlight() 44 | " Normal first 45 | " see :help :hi-normal-cterm 46 | for group in sort(keys(s:props), function('s:normal_first')) 47 | call s:set_highlight(group) 48 | endfor 49 | endfunction 50 | 51 | 52 | function! s:normal_first(g1, g2) 53 | if a:g1 == 'Normal' 54 | return -1 55 | endif 56 | if a:g2 == 'Normal' 57 | return 1 58 | endif 59 | return a:g1 >= a:g2 ? 1 : -1 60 | endfunction 61 | 62 | 63 | function! s:set_highlight(group) 64 | let args = s:props[a:group] 65 | 66 | let fg = s:get(args, 0, '') 67 | let bg = s:get(args, 1, '') 68 | let attr = s:get(args, 2, '') 69 | 70 | let term_fg = s:get(args, 3, '') 71 | let term_bg = s:get(args, 4, '') 72 | let term_attr = s:get(args, 5, '') 73 | 74 | let cmd_args = [ 75 | \ s:maybe(' guifg=#', fg), 76 | \ s:maybe(' guibg=#', bg), 77 | \ s:maybe(' gui=', attr), 78 | \ s:maybe(' ctermfg=', s:or(term_fg, s:tco(fg))), 79 | \ s:maybe(' ctermbg=', s:or(term_bg, s:tco(bg))), 80 | \ s:maybe(' cterm=', term_attr), 81 | \] 82 | 83 | if attr == 'undercurl' 84 | call add(cmd_args, s:maybe(' guisp=#', fg)) 85 | call add(cmd_args, s:maybe(' cterm=', s:or(term_attr, 'underline'))) 86 | endif 87 | 88 | call s:print("\thi " . a:group . join(cmd_args, '')) 89 | endfunction 90 | 91 | 92 | function! s:maybe(key_eq, val) 93 | if empty(a:val) 94 | return '' 95 | endif 96 | return a:key_eq . a:val 97 | endfunction 98 | 99 | 100 | function! s:or(val, def_val) 101 | if !empty(a:val) 102 | return a:val 103 | endif 104 | return a:def_val 105 | endfunction 106 | 107 | 108 | function! s:get(args, index, default, ...) 109 | let val = s:get_val(a:args, a:index, a:default) 110 | if val == '' 111 | return val 112 | endif 113 | " rgb color 114 | if val =~ '^#[a-fA-F0-9]\{6\}' 115 | return strpart(val, 1) 116 | endif 117 | " Starting with '@' means a syntax group reference 118 | if val =~ '^@' 119 | let val = strpart(val, 1) 120 | let props = (a:0 > 0) ? a:1 : copy(s:props) 121 | let new_args = get(props, val, []) 122 | if empty(new_args) 123 | return '' 124 | endif 125 | call remove(props, val) 126 | return s:get(new_args, a:index, a:default, props) 127 | endif 128 | " attribute 129 | return val 130 | endfunction 131 | 132 | 133 | function! s:get_val(args, index, default) 134 | let val = get(a:args, a:index, a:default) 135 | if val == s:base 136 | return get(s:base_args, a:index, '') 137 | endif 138 | if val != '' 139 | return val 140 | endif 141 | return a:default 142 | endfunction 143 | 144 | 145 | " Terminal COlor 146 | function! s:tco(rgb) 147 | if empty(a:rgb) 148 | return '' 149 | endif 150 | let r = ('0x' . strpart(a:rgb, 0, 2)) + 0 151 | let g = ('0x' . strpart(a:rgb, 2, 2)) + 0 152 | let b = ('0x' . strpart(a:rgb, 4, 2)) + 0 153 | let c = s:rgb2tco(r, g, b) 154 | return c 155 | endfunction 156 | 157 | 158 | function! s:rgb2tco(r, g, b) 159 | if s:rgb_is_gray(a:r, a:g, a:b) 160 | return s:rgb2gray(a:r, a:g, a:b) 161 | else 162 | return s:rgb2color(a:r, a:g, a:b) 163 | endif 164 | endfunction 165 | 166 | 167 | function! s:rgb2color(r, g, b) 168 | let r = float2nr(5.0 * a:r / 255.0 - 0.45) 169 | let g = float2nr(5.0 * a:g / 255.0 - 0.45) 170 | let b = float2nr(5.0 * a:b / 255.0 - 0.45) 171 | let r = (r < 0) ? 0 : r 172 | let g = (g < 0) ? 0 : g 173 | let b = (b < 0) ? 0 : b 174 | let c = 16 + (r * 36) + (g * 6) + (b) 175 | return c 176 | endfunction 177 | 178 | 179 | function! s:rgb2gray(r, g, b) 180 | let gray = float2nr(23.0 * (a:r + a:g + a:b) / 3.0 / 255.0 - 0.45) 181 | let gray = (gray < 0) ? 0 : gray 182 | let gray += 232 183 | return gray 184 | endfunction 185 | 186 | 187 | function! s:rgb_is_gray(r, g, b) 188 | let r = a:r * a:r 189 | let g = a:g * a:g 190 | let b = a:b * a:b 191 | let a = (r + g + b) / 3.0 " average 192 | let t = 1500.0 " threshold 193 | if (abs(a -r) < t && abs(a - g) < t && abs(a - b) < t) 194 | return 1 195 | endif 196 | return 0 197 | endfunction 198 | " }}} 199 | 200 | 201 | " highlights " {{{ 202 | function! s:set_light_colors() " {{{ 203 | let _ = '' 204 | let b = s:base 205 | let frame = '#4a4642' 206 | 207 | let s:base_args = ['#2e2e2e', '#f0f0e5', 'none', 234, 255, 'none'] 208 | 209 | let darkred = '#ffe3e5' 210 | 211 | call s:hi('CursorLine', _, '#cce0ef', 'none', _, 153, 'none') 212 | call s:hi('Directory', '#1177dd') 213 | call s:hi('Folded', '#04530d', '#d0ead0') 214 | call s:hi('LineNr', '#567686', '#e2e2d0', _, 236) 215 | call s:hi('ModeMsg', '#337ca3') 216 | call s:hi('MoreMsg', '#1e7b3d') 217 | call s:hi('WarningMsg', '#ea6042') 218 | call s:hi('NonText', '#7878ba', _, b) 219 | call s:hi('Question', '#008080') 220 | call s:hi('IncSearch', b, '#f4b3c2', b, b, 218) 221 | call s:hi('Search', b, '#e9e7ac') 222 | call s:hi('SpecialKey', '#aabbcc') 223 | call s:hi('StatusLine', '#dcdcdc', frame, 'none') 224 | call s:hi('StatusLineNC', '@StatusLine', '#7a7672', 'italic', _, _, b) 225 | call s:hi('VertSplit', frame, frame, 'none') 226 | call s:hi('Visual', _, '#cce0ef', _, _, 153) 227 | call s:hi('TabLineSel', frame, _, b) 228 | call s:hi('Pmenu', b, '#f6e4e7', _, _, 231) 229 | call s:hi('Comment', '#878965', _) 230 | call s:hi('ColorColumn', _, '#dfd6d1') 231 | 232 | call s:hi('Constant', '#00695c') 233 | call s:hi('Identifier', '#546e7a') 234 | call s:hi('Statement', '#0c6cc0', _, b) 235 | call s:hi('Special', '#1041a8') 236 | call s:hi('PreProc', '#6b118a') 237 | call s:hi('Type', '@Constant', _, b) 238 | call s:hi('Function', '#cb1265') 239 | call s:hi('MatchParen', '#0e8ed3', '#dbf2ff') 240 | call s:hi('Ignore', '#666666') 241 | call s:hi('Todo', '#4d4214', '#fdfec9', _, _, 229) 242 | call s:hi('Error', '#d1160b', darkred, _, _, 223) 243 | call s:hi('Tag', '#a25a09') 244 | call s:hi('SpellBad', '@Error', '@Error', 'undercurl', _, '@Error') 245 | call s:hi('SpellCap', '@String', '@MatchParen', 'undercurl') 246 | call s:hi('SpellRare', '@Folded', '@Folded', 'undercurl') 247 | call s:hi('SpellLocal', '@Todo', '@Todo', 'undercurl', _, '@Todo') 248 | call s:hi('DiffAdd', _, '@SpellRare') 249 | call s:hi('DiffDelete', darkred, darkred, _, 174, 174) 250 | call s:hi('DiffChange', _, '@SpellLocal', _, _, '@Todo') 251 | call s:hi('DiffText', _, '#fed910') 252 | endfunction " }}} 253 | 254 | 255 | function! s:set_dark_colors() " {{{ 256 | let _ = '' 257 | let x = '#121713' 258 | let b = s:base 259 | let frame = '#292c2f' 260 | 261 | let s:base_args = ['#dadad5', x, 'none', 255, 234, 'none'] 262 | 263 | call s:hi('CursorLine', _, '#23343d', 'none', _, 24, 'none') 264 | call s:hi('Directory', '#6aaaea') 265 | call s:hi('Folded', '#a0cab0', '#303a3b') 266 | call s:hi('LineNr', '#7c8884', '#132423') 267 | call s:hi('ModeMsg', '#6badd1') 268 | call s:hi('MoreMsg', '#add581') 269 | call s:hi('WarningMsg', '#e0b088') 270 | call s:hi('NonText', '#7878ba', _, b) 271 | call s:hi('Question', '#00a0a0') 272 | call s:hi('IncSearch', b, '#d51487', b, _, 162) 273 | call s:hi('Search', x, '#c9c73c') 274 | call s:hi('SpecialKey', '#3a4857', _, _, 59) 275 | call s:hi('StatusLine', '#b2b5b2', frame, 'none', _, 237) 276 | call s:hi('StatusLineNC', '#727572', '#020508', 'italic', 235, 232, b) 277 | call s:hi('VertSplit', frame, frame, 'none', 237, 237) 278 | call s:hi('Visual', _, '#23343d', _, _, 24) 279 | call s:hi('TabLineSel', '@Function', _, b) 280 | call s:hi('Pmenu', b, '@StatusLine', _, _, 237) 281 | call s:hi('Comment', '#707073', _) 282 | call s:hi('ColorColumn', _, '#262f21') 283 | 284 | call s:hi('Constant', '#70a395') 285 | call s:hi('Identifier', '#91a8a5') 286 | call s:hi('Statement', '#91b5d4', _, b) 287 | call s:hi('PreProc', '#8d89c7') 288 | call s:hi('Special', '#a7a053') 289 | call s:hi('Type', '#5f94ca', _, b) 290 | call s:hi('Function', '#d789c8', _, _, 168) 291 | call s:hi('MatchParen', b, '#088b8c') 292 | call s:hi('Ignore', '#666666') 293 | call s:hi('Todo', '#fdfec9', '#4d4214', _, _, b) 294 | call s:hi('Error', '#ff8485', b, _, _, b) 295 | call s:hi('Tag', '#d38d6b') 296 | call s:hi('SpellBad', '@Error', b, 'undercurl', '@Error') 297 | call s:hi('SpellCap', '@String', b, 'undercurl') 298 | call s:hi('SpellRare', '@Folded', b, 'undercurl') 299 | call s:hi('SpellLocal', '@Todo', b, 'undercurl', '@Todo') 300 | call s:hi('DiffAdd', _, '#013a06', b, 71, 16) 301 | call s:hi('DiffDelete', '#491008', '#491008', _, 237, 237) 302 | call s:hi('DiffChange', _, '#4a4707', _, 178, 235) 303 | call s:hi('DiffText', '#fefd03', '#7b7b00', _, 226) 304 | endfunction " }}} 305 | 306 | 307 | function! s:set_common_colors() " {{{ 308 | let _ = '' 309 | let b = s:base 310 | 311 | call s:hi('Normal', b, b, b, b, b, b) 312 | 313 | call s:hi('Cursor', _, '#f39812') 314 | call s:hi('CursorIM', _, '#4a9f68') 315 | call s:hi('CursorColumn', _, '@CursorLine') 316 | call s:copy('FoldColumn', '@Folded') 317 | call s:hi('CursorLineNr', '@LineNr', '@CursorLine', 'none') 318 | call s:copy('ErrorMsg', '@Error') 319 | call s:copy('TabLine', '@StatusLine') 320 | call s:copy('TabLineFill', '@StatusLine') 321 | call s:hi('Title', '@Special', _, b) 322 | call s:copy('PmenuSel', '@IncSearch') 323 | call s:copy('PmenuSbar', '@Pmenu') 324 | call s:copy('PmenuThumb', '@PmenuSel') 325 | call s:copy('SignColumn', '@LineNr') 326 | 327 | call s:hi('String', '@Special') 328 | call s:hi('Operator', '@PreProc') 329 | call s:hi('Underlined', '@Statement') 330 | call s:copy('WildMenu', '@Normal') 331 | call s:hi('Conceal', '@Statement', b, b) 332 | endfunction " }}} 333 | " }}} 334 | 335 | 336 | " Make colorscheme file {{{ 337 | call s:print('" This file is built by ../source.vim.') 338 | call s:print('" Do not modify this file directly.') 339 | call s:print('highlight clear') 340 | call s:print("if exists('syntax_on')") 341 | call s:print("\tsyntax reset") 342 | call s:print('endif') 343 | call s:print('') 344 | call s:print("let g:colors_name = 'scheakur'") 345 | call s:print('') 346 | call s:print("if &background == 'light'") 347 | call s:highlight('light') 348 | call s:print('else') 349 | " reset highlighting properties 350 | let s:props = {} 351 | call s:highlight('dark') 352 | call s:print('endif') 353 | 354 | call s:writefile('colors/scheakur.vim') 355 | " }}} 356 | 357 | 358 | " cleanup {{{ 359 | " TODO need ? 360 | delfunction s:do_highlight 361 | delfunction s:hi 362 | delfunction s:get 363 | delfunction s:get_val 364 | delfunction s:tco 365 | delfunction s:rgb2tco 366 | delfunction s:rgb_is_gray 367 | delfunction s:rgb2gray 368 | delfunction s:rgb2color 369 | delfunction s:highlight 370 | delfunction s:set_light_colors 371 | delfunction s:set_dark_colors 372 | delfunction s:set_common_colors 373 | unlet s:base_args 374 | unlet s:base 375 | unlet s:props 376 | unlet s:output 377 | " }}} 378 | 379 | " vim: set noexpandtab foldmethod=marker : 380 | --------------------------------------------------------------------------------