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

adding dalton theme #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Use your favorite package-manager to install, and enjoy!
| [Atom] | Designed to be very readable in both light and dark environments | | ✓ |
| [carbonized] | Inspired by the Carbon keycap set | ✓ (16) | ✓ |
| [challenger-deep] | FlatColor colorscheme | ✓ | ✓ |
| [dalton] | Dark theme with some blue | ✓ | ✓ |
| [deep-space] | Intergalactic friendly color scheme based off Hybrid | ✓ | ✓ |
| [deus] | For the late night coder | ✓ | ✓ |
| [dogrun] | Dark purple | ✓ | ✓ |
Expand Down Expand Up @@ -85,6 +86,7 @@ Use your favorite package-manager to install, and enjoy!
[ayu-vim]: https://github.com/ayu-theme/ayu-vim
[carbonized]: https://github.com/nightsense/carbonized
[challenger-deep]: https://github.com/challenger-deep-theme/vim
[dalton]: https://github.com/edersonferreira/dalton-vim
[deep-space]: https://github.com/tyrannicaltoucan/vim-deep-space
[deus]: https://github.com/ajmwagar/vim-deus
[dogrun]: https://github.com/wadackel/vim-dogrun
Expand Down
42 changes: 42 additions & 0 deletions autoload/airline/themes/dalton.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
" Normal mode
let s:N1 = [ '#EEEEEE' , '#253340' , 255 , 240 ] " guifg guibg ctermfg ctermbg
let s:N2 = [ '#EEEEEE' , '#0E1317' , 255 , 235 ] " guifg guibg ctermfg ctermbg
let s:N3 = [ '#B3B1AD' , '#0C0A0F' , 250 , 235 ] " guifg guibg ctermfg ctermbg

" Insert mode
let s:I1 = [ '#EEEEEE' , '#006CA1' , 255 , 43 ] " guifg guibg ctermfg ctermbg
let s:I2 = [ '#006CA1' , '#0E1317' , 255 , 235 ] " guifg guibg ctermfg ctermbg
let s:I3 = [ '#B3B1AD' , '#0C0A0F' , 250 , 235 ] " guifg guibg ctermfg ctermbg

" Visual mode
let s:V1 = [ '#EEEEEE' , '#C46C00' , 255 , 172 ] " guifg guibg ctermfg ctermbg
let s:V2 = [ '#C46C00' , '#0E1317' , 255 , 235 ] " guifg guibg ctermfg ctermbg
let s:V3 = [ '#B3B1AD' , '#0C0A0F' , 250 , 235 ] " guifg guibg ctermfg ctermbg

" Replace mode
let s:RE = [ '#EEEEEE' , '#FF3333' , 255 , 202 ] " guifg guibg ctermfg ctermbg

"modified color
let s:modified = [22, '#005F00']

let g:airline#themes#dalton#palette = {}

let g:airline#themes#dalton#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)

let g:airline#themes#dalton#palette.normal_modified = {
\ 'airline_a': ['', s:modified[1], '', s:modified[0], ''],
\ 'airline_c': [s:modified[1], '', s:modified[0], '', ''],
\ 'airline_x': [s:modified[1], '', s:modified[0], '', ''],
\ 'airline_z': ['', s:modified[1], '', s:modified[0], '']}

let g:airline#themes#dalton#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#dalton#palette.insert_replace = {
\ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] }

let g:airline#themes#dalton#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)

let g:airline#themes#dalton#palette.replace = copy(g:airline#themes#dalton#palette.normal)
let g:airline#themes#dalton#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ]

let s:IA = [ s:N1[1] , s:N3[1] , s:N1[3] , s:N3[3] , '' ]
let g:airline#themes#dalton#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
275 changes: 275 additions & 0 deletions colors/dalton.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,275 @@
" Initialisation:"{{{
" ----------------------------------------------------------------------------
hi clear
if exists("syntax_on")
syntax reset
endif

let g:colors_name = "dalton"
"}}}

" Palettes:"{{{
" ----------------------------------------------------------------------------

let s:palette = {}

let s:palette.bg = { 'dark': "#0C0A0F"}

let s:palette.comment = {'dark': "#5C6773"}
let s:palette.markup = {'dark': "#F07178"}
let s:palette.constant = {'dark': "#FFEE99"}
let s:palette.operator = {'dark': "#E7C547"}
let s:palette.tag = {'dark': "#36A3D9"}
let s:palette.regexp = {'dark': "#95E6CB"}
let s:palette.string = {'dark': "#B8CC52"}
let s:palette.function = {'dark': "#FFB454"}
let s:palette.special = {'dark': "#E6B673"}
let s:palette.keyword = {'dark': "#FF7733"}

let s:palette.error = {'dark': "#FF3333"}
let s:palette.accent = {'dark': "#F29718"}
let s:palette.panel = {'dark': "#14191F"}
let s:palette.guide = {'dark': "#2D3640"}
let s:palette.line = {'dark': "#161419"}
let s:palette.selection = {'dark': "#253340"}
let s:palette.fg = {'dark': "#EEEEEE"}
let s:palette.fg_idle = {'dark': "#3E4B59"}
"}}}

" Highlighting Primitives:"{{{
" ----------------------------------------------------------------------------

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]['dark'] " guibg=...
exe "let " . l:vname . " = ' " . l:gui_assign . "'"
endfunction

let s:bg_none = ' guibg=NONE ctermbg=NONE'
let s:fg_none = ' guifg=NONE ctermfg=NONE'
for [key_name, d_value] in items(s:palette)
call s:build_prim('bg', key_name)
call s:build_prim('fg', key_name)
endfor
" }}}

" Formatting Options:"{{{
" ----------------------------------------------------------------------------
let s:none = "NONE"
let s:t_none = "NONE"
let s:n = "NONE"
let s:c = ",undercurl"
let s:r = ",reverse"
let s:s = ",standout"
let s:b = ",bold"
let s:u = ",underline"
let s:i = ",italic"

exe "let s:fmt_none = ' gui=NONE". " cterm=NONE". " term=NONE" ."'"
exe "let s:fmt_bold = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_bldi = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_undr = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_undb = ' gui=NONE".s:u.s:b. " cterm=NONE".s:u.s:b. " term=NONE".s:u.s:b."'"
exe "let s:fmt_undi = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_curl = ' gui=NONE".s:c. " cterm=NONE".s:c. " term=NONE".s:c ."'"
exe "let s:fmt_ital = ' gui=NONE".s:i. " cterm=NONE".s:i. " term=NONE".s:i ."'"
exe "let s:fmt_stnd = ' gui=NONE".s:s. " cterm=NONE".s:s. " term=NONE".s:s ."'"
exe "let s:fmt_revr = ' gui=NONE".s:r. " cterm=NONE".s:r. " term=NONE".s:r ."'"
exe "let s:fmt_revb = ' gui=NONE".s:r.s:b. " cterm=NONE".s:r.s:b. " term=NONE".s:r.s:b."'"
"}}}


" Vim Highlighting: (see :help highlight-groups)"{{{
" ----------------------------------------------------------------------------
exe "hi! Normal" .s:fg_fg .s:bg_bg .s:fmt_none
exe "hi! ColorColumn" .s:fg_none .s:bg_line .s:fmt_none
" Conceal, Cursor, CursorIM
exe "hi! CursorColumn" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLine" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLineNr" .s:fg_accent .s:bg_line .s:fmt_none
exe "hi! LineNr" .s:fg_guide .s:bg_none .s:fmt_none

exe "hi! Directory" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! DiffAdd" .s:fg_string .s:bg_panel .s:fmt_none
exe "hi! DiffChange" .s:fg_tag .s:bg_panel .s:fmt_none
exe "hi! DiffText" .s:fg_fg .s:bg_panel .s:fmt_none
exe "hi! ErrorMsg" .s:fg_fg .s:bg_error .s:fmt_stnd
exe "hi! VertSplit" .s:fg_bg .s:bg_none .s:fmt_none
exe "hi! Folded" .s:fg_fg_idle .s:bg_panel .s:fmt_none
exe "hi! FoldColumn" .s:fg_none .s:bg_panel .s:fmt_none
exe "hi! SignColumn" .s:fg_none .s:bg_panel .s:fmt_none
" Incsearch"

exe "hi! MatchParen" .s:fg_fg .s:bg_bg .s:fmt_undr
exe "hi! ModeMsg" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! MoreMsg" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! NonText" .s:fg_guide .s:bg_none .s:fmt_none
exe "hi! Pmenu" .s:fg_fg .s:bg_selection .s:fmt_none
exe "hi! PmenuSel" .s:fg_fg .s:bg_selection .s:fmt_revr
" PmenuSbar"
" PmenuThumb"
exe "hi! Question" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! Search" .s:fg_bg .s:bg_constant .s:fmt_none
exe "hi! SpecialKey" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! SpellCap" .s:fg_tag .s:bg_none .s:fmt_undr
exe "hi! SpellLocal" .s:fg_keyword .s:bg_none .s:fmt_undr
exe "hi! SpellBad" .s:fg_error .s:bg_none .s:fmt_undr
exe "hi! SpellRare" .s:fg_regexp .s:bg_none .s:fmt_undr
exe "hi! StatusLine" .s:fg_fg .s:bg_panel .s:fmt_none
exe "hi! StatusLineNC" .s:fg_fg_idle .s:bg_panel .s:fmt_none
exe "hi! WildMenu" .s:fg_bg .s:bg_markup .s:fmt_none
exe "hi! TabLine" .s:fg_fg .s:bg_panel .s:fmt_revr
" TabLineFill"
" TabLineSel"
exe "hi! Title" .s:fg_keyword .s:bg_none .s:fmt_none
exe "hi! Visual" .s:fg_none .s:bg_selection .s:fmt_none
" VisualNos"
exe "hi! WarningMsg" .s:fg_error .s:bg_none .s:fmt_none

" TODO LongLineWarning to use variables instead of hardcoding
hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
" WildMenu"

"}}}

" Generic Syntax Highlighting: (see :help group-name)"{{{
" ----------------------------------------------------------------------------
exe "hi! Comment" .s:fg_comment .s:bg_none .s:fmt_none

exe "hi! Constant" .s:fg_constant .s:bg_none .s:fmt_none
exe "hi! String" .s:fg_string .s:bg_none .s:fmt_none
" Character"
" Number"
" Boolean"
" Float"

exe "hi! Identifier" .s:fg_tag .s:bg_none .s:fmt_none
exe "hi! Function" .s:fg_function .s:bg_none .s:fmt_none

exe "hi! Statement" .s:fg_keyword .s:bg_none .s:fmt_none
" Conditional"
" Repeat"
" Label"
exe "hi! Operator" .s:fg_operator .s:bg_none .s:fmt_none
" Keyword"
" Exception"

exe "hi! PreProc" .s:fg_special .s:bg_none .s:fmt_none
" Include"
" Define"
" Macro"
" PreCondit"

exe "hi! Type" .s:fg_tag .s:bg_none .s:fmt_none
" StorageClass"
exe "hi! Structure" .s:fg_special .s:bg_none .s:fmt_none
" Typedef"

exe "hi! Special" .s:fg_special .s:bg_none .s:fmt_none
" SpecialChar"
" Tag"
" Delimiter"
" SpecialComment"
" Debug"
"
exe "hi! Underlined" .s:fg_tag .s:bg_none .s:fmt_undr

exe "hi! Ignore" .s:fg_none .s:bg_none .s:fmt_none

exe "hi! Error" .s:fg_fg .s:bg_error .s:fmt_none

exe "hi! Todo" .s:fg_markup .s:bg_none .s:fmt_none

" Quickfix window highlighting
exe "hi! qfLineNr" .s:fg_keyword .s:bg_none .s:fmt_none
" qfFileName"
" qfLineNr"
" qfError"

exe "hi! Conceal" .s:fg_guide .s:bg_none .s:fmt_none
exe "hi! CursorLineConceal" .s:fg_guide .s:bg_line .s:fmt_none


" Terminal
" ---------
if has("nvim")
let g:terminal_color_0 = s:palette.bg['dark']
let g:terminal_color_1 = s:palette.markup['dark']
let g:terminal_color_2 = s:palette.string['dark']
let g:terminal_color_3 = s:palette.accent['dark']
let g:terminal_color_4 = s:palette.tag['dark']
let g:terminal_color_5 = s:palette.constant['dark']
let g:terminal_color_6 = s:palette.regexp['dark']
let g:terminal_color_7 = "#FFFFFF"
let g:terminal_color_8 = s:palette.fg_idle['dark']
let g:terminal_color_9 = s:palette.error['dark']
let g:terminal_color_10 = s:palette.string['dark']
let g:terminal_color_11 = s:palette.accent['dark']
let g:terminal_color_12 = s:palette.tag['dark']
let g:terminal_color_13 = s:palette.constant['dark']
let g:terminal_color_14 = s:palette.regexp['dark']
let g:terminal_color_15 = s:palette.comment['dark']
let g:terminal_color_background = g:terminal_color_0
let g:terminal_color_foreground = s:palette.fg['dark']
else
let g:terminal_ansi_colors = [s:palette.bg['dark'], s:palette.markup['dark']]
let g:terminal_ansi_colors += [s:palette.string['dark'], s:palette.accent['dark']]
let g:terminal_ansi_colors += [s:palette.tag['dark'], s:palette.constant['dark']]
let g:terminal_ansi_colors += [s:palette.regexp['dark'], "#FFFFFF"]
let g:terminal_ansi_colors += [s:palette.fg_idle['dark'], s:palette.error['dark']]
let g:terminal_ansi_colors += [s:palette.string['dark'], s:palette.accent['dark']]
let g:terminal_ansi_colors += [s:palette.tag['dark'], s:palette.constant['dark']]
let g:terminal_ansi_colors += [s:palette.regexp['dark'], s:palette.comment['dark']]
endif


" NerdTree
" ---------
exe "hi! NERDTreeOpenable" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeClosable" .s:fg_accent .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarksHeader" .s:fg_pink .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarksLeader" .s:fg_bg .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarkName" .s:fg_keyword .s:bg_none .s:fmt_none
" exe "hi! NERDTreeCWD" .s:fg_pink .s:bg_none .s:fmt_none
exe "hi! NERDTreeUp" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeDir" .s:fg_function .s:bg_none .s:fmt_none
exe "hi! NERDTreeFile" .s:fg_none .s:bg_none .s:fmt_none
exe "hi! NERDTreeDirSlash" .s:fg_accent .s:bg_none .s:fmt_none


" GitGutter
" ---------
exe "hi! GitGutterAdd" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! GitGutterChange" .s:fg_tag .s:bg_none .s:fmt_none
exe "hi! GitGutterDelete" .s:fg_markup .s:bg_none .s:fmt_none
exe "hi! GitGutterChangeDelete" .s:fg_function .s:bg_none .s:fmt_none

"}}}

" Diff Syntax Highlighting:"{{{
" ----------------------------------------------------------------------------
" Diff
" diffOldFile
" diffNewFile
" diffFile
" diffOnly
" diffIdentical
" diffDiffer
" diffBDiffer
" diffIsA
" diffNoEOL
" diffCommon
hi! link diffRemoved Constant
" diffChanged
hi! link diffAdded String
" diffLine
" diffSubname
" diffComment

"}}}
"
" This is needed for some reason: {{{

let &background = 'dark'

" }}}
55 changes: 55 additions & 0 deletions docs/dalton-vim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Dalton.vim

Dalton is a minimalist theme for Vim, very based in [Ayu Vim theme](https://github.com/ayu-theme/ayu-vim), only with dark theme.

# Screenshots

## Dalton Screenshot:

![Dalton](https://github.com/edersonferreira/dalton-vim/blob/master/assets/dalton.png)

## Dalton for Vim-Airline

![Airline](https://github.com/edersonferreira/dalton-vim/blob/master/assets/daltonairline.png)

# Install

Add the Dalton to your Vim plugins manager.

## Vundle

Add these lines to your Vim config file:

```vim
call vundle#begin()

Plugin 'edersonferreira/dalton-vim'

call vundle#end()

color dalton
```

## Vim Plug

```vim
call plug#begin()

Plug 'edersonferreira/dalton-vim'

call plug#end()

color dalton
```

## Vim Airline

To use dalton in Vim Airline, change/add this line to your vim conig file:

```
let g:airline_theme='dalton'
```

# More dalton themes for another programs

[Dalton for Rofi](https://github.com/edersonferreira/dalton-rofi)
1 change: 1 addition & 0 deletions pull-updates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function _main() {
_dl scheakur/vim-scheakur
_dl sts10/vim-pink-moon
_dl tomasr/molokai
_dl edersonferreira/dalton-vim
_dl tyrannicaltoucan/vim-deep-space
_dl vim-scripts/pyte
_dl vim-scripts/rdark-terminal2.vim
Expand Down