Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add light theme #35

Merged
merged 2 commits into from
May 31, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 62 additions & 2 deletions colors/spaceduck.vim
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,31 @@ let g:colors_name="spaceduck"

" Spaceduck Color Variables {{{
" dark theme and light theme settings
" TODO light theme isn't done yet
let s:palette = {
\ 'red': ['#e33400', '166'],
\ 'orange': ['#e39400', '172'],
\ 'green': ['#5ccc96', '78'],
\ 'yellow': ['#f2ce00', '220'],
\ 'lavender': ['#b3a1e6', '146'],
\ 'grape': ['#7a5ccc', '98'],
\ 'space': ['#30365F', '237'],
\ 'blueberry': ['#686f9a', '60'],
\ 'cyan': ['#00a3cc', '38'],
\ 'magenta': ['#ce6f8f', '168'],
\
\ 'deep_space': ['#0f111b', '233'],
\ 'cream': ['#ecf0c1', '255'],
\ 'vision': ['#1b1c36', '234'],
\ 'cursor': ['#16172d', '234'],
\
\ 'grey': ['#818596', '102'],
\ 'light_grey': ['#818596', '102'],
\ 'white': ['#ffffff', '15'],
\ 'black': ['#000000', '0'],
\
\ 'none': ['NONE', 'NONE']
\ }

if &background == 'dark'
hi SpaceduckRed guifg=#e33400 ctermfg=166 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckOrange guifg=#e39400 ctermfg=172 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
Expand All @@ -37,11 +61,47 @@ if &background == 'dark'
hi SpaceduckMagenta guifg=#ce6f8f ctermfg=168 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE

hi SpaceduckForeground guifg=#ecf0c1 ctermfg=255 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE

let s:palette.bg = s:palette.deep_space
let s:palette.fg = s:palette.cream

elseif &background == 'light'
hi SpaceduckRed guifg=#e33400 ctermfg=166 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckOrange guifg=#e39400 ctermfg=172 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckGreen guifg=#5ccc96 ctermfg=78 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckYellow guifg=#f2ce00 ctermfg=220 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckPurple guifg=#b3a1e6 ctermfg=237 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckPurple2 guifg=#7a5ccc ctermfg=98 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckDarkPurple guifg=#30365F ctermfg=237 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckDarkPurple2 guifg=#686f9a ctermfg=60 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckCyan guifg=#59c2ff ctermfg=38 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckMagenta guifg=#ce6f8f ctermfg=168 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE

hi SpaceduckForeground guifg=#ecf0c1 ctermfg=255 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE

let s:palette.bg = s:palette.cream
let s:palette.fg = s:palette.deep_space

endif
" }}}
"
" Highlight function {{{
function! s:hi(group, fg, bg, ...)
let hl_string = [
\ 'highlight', a:group,
\ 'guifg=' . a:fg[0],
\ 'guibg=' . a:bg[0],
\ 'ctermfg=' . a:fg[1],
\ 'ctermbg=' . a:bg[1],
\ ]

execute join(hl_string, ' ')
endfunction
" }}}

" Syntax Highlighting {{{
hi Normal guifg=#ecf0c1 ctermfg=255 guibg=#0f111b ctermbg=233 gui=NONE cterm=NONE
call s:hi('Normal', s:palette.fg, s:palette.bg)

hi! link Boolean SpaceduckYellow
hi! link Character SpaceduckYellow
hi ColorColumn guifg=NONE ctermfg=NONE guibg=#16172d ctermbg=234 gui=NONE cterm=NONE
Expand Down