Skip to content

Commit

Permalink
Simplify g:wwdc16_palette.
Browse files Browse the repository at this point in the history
  • Loading branch information
lifepillar committed Jun 11, 2017
1 parent 9f74888 commit b2a4634
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
20 changes: 2 additions & 18 deletions colors/wwdc16.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,8 @@ if !has('gui_running') && get(g:, 'wwdc16_term_trans_bg', 0)
else
hi Normal ctermfg=15 ctermbg=0 cterm=NONE guifg=#ffffff guibg=#292c36 gui=NONE
endif
let g:wwdc16_palette = [
\ ['#292c36', '0'],
\ ['#dc3c3c', '1'],
\ ['#64878f', '2'],
\ ['#d28e5d', '3'],
\ ['#4670d8', '4'],
\ ['#b73999', '5'],
\ ['#00aba5', '6'],
\ ['#999999', '7'],
\ ['#333333', '8'],
\ ['#666666', '9'],
\ ['#52bd58', '10'],
\ ['#95c76f', '11'],
\ ['#4670d8', '12'],
\ ['#8485ce', '13'],
\ ['#00aba5', '14'],
\ ['#ffffff', '15'],
\ ]

let g:wwdc16_palette = ['#292c36', '#dc3c3c', '#64878f', '#d28e5d', '#4670d8', '#b73999', '#00aba5', '#999999', '#333333', '#666666', '#52bd58', '#95c76f', '#4670d8', '#8485ce', '#00aba5', '#ffffff']

hi ColorColumn ctermfg=NONE ctermbg=8 cterm=NONE guifg=NONE guibg=#333333 gui=NONE guisp=NONE
hi Conceal ctermfg=2 ctermbg=NONE cterm=NONE guifg=#64878f guibg=NONE gui=NONE guisp=NONE
Expand Down
9 changes: 3 additions & 6 deletions src/wwdc16.vim
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,10 @@ call s:put(" hi Normal ctermfg=".s:fg[1]." ctermbg=NONE cterm=NONE guifg=".s:fg
call s:put("else")
call s:put(" hi Normal ctermfg=".s:fg[1]." ctermbg=".s:bg[1]." cterm=NONE guifg=".s:fg[0]." guibg=".s:bg[0]." gui=NONE")
call s:put("endif")

call s:put("let g:wwdc16_palette = [")
for col in s:palette
call s:put(" \\ ['" . col[0] . "', '" . col[1] . "'],")
endfor
call s:put(" \\ ]")
call s:put("")
call s:put("let g:wwdc16_palette = [" . join(map(copy(s:palette), {_,c -> "'".c[0]."'"}), ', ') . "]")
call s:put("")


call s:hl("ColorColumn", s:none, s:grey1)
call s:hl("Conceal", s:forestgreen, s:none)
Expand Down

0 comments on commit b2a4634

Please sign in to comment.