├── README.md ├── allomancer.Xresources ├── colors └── allomancer.vim └── images ├── allomancer-C.png ├── allomancer-hs.png ├── allomancer-md.png ├── allomancer-py.png ├── allomancer-sh.png └── logo.png /README.md: -------------------------------------------------------------------------------- 1 | ![logo](/images/logo.png) 2 | 3 | A dark vim colorscheme, inspired mainly by [vim-two-firewatch](https://github.com/rakr/vim-two-firewatch) but using colors from [apprentice](https://github.com/romainl/Apprentice) and some code from both apprentice and [monokai-tasty](https://github.com/patstockwell/vim-monokai-tasty). All credit for the source code goes to the original authors. I just put it all together in a way that matched what I like and I hope to grow this colorscheme with my own ideas and improvements in the future. 4 | 5 | The name is inspired by Brandon Sanderson's awesome book series [Mistborn](https://en.wikipedia.org/wiki/Mistborn) 6 | 7 | ## Main color palette 8 | 9 | | Color name |Color Code | Color | Main use | 10 | |------------------|---------- |------------------------------------------------------------|-----------------------| 11 | | Blue | `#6E88A6` |![#6E88A6](https://placehold.it/100x40/6E88A6/111111?text=+)| Identifiers | 12 | | Beige | `#D7AFAF` |![#D7AFAF](https://placehold.it/100x40/D7AFAF/000000?text=+)| Functions | 13 | | Green | `#87AF87` |![#87AF87](https://placehold.it/100x40/87AF87/000000?text=+)| Strings and Special | 14 | | Red | `#af5f5f` |![#af5f5f](https://placehold.it/100x40/af5f5f/000000?text=+)| Statements | 15 | | Orange | `#FF875F` |![#FF875F](https://placehold.it/100x40/FF875F/000000?text=+)| Constants | 16 | | Purple | `#875faf` |![#875faf](https://placehold.it/100x40/875faf/000000?text=+)| Types | 17 | | Aqua | `#5fafaf` |![#5fafaf](https://placehold.it/100x40/5fafaf/000000?text=+)| Focus and Highlights | 18 | 19 | ## Installation 20 | 21 | To install the colorscheme you can either: 22 | 23 | 1. Use a plugin manager such as [vim-plug](https://github.com/junegunn/vim-plug). 24 | 25 | Add the following to your vimrc and run PlugInstall 26 | 27 | Plug 'Nequo/vim-allomancer' 28 | 29 | 2. Manually clone/download the repo and move the file allomancer.vim to ".vim/colors/" 30 | 31 | 32 | ## Using the colorscheme 33 | 34 | Once installed add the following to your .vimrc 35 | 36 | set termguicolors "Remove this in urxvt 37 | colo allomancer 38 | 39 | ## The colorscheme isn't working? 40 | 41 | This is still a work in progress and the colors I use aren't in the 256 xterm colorspace. One "workaround" that I use is to use the matching colorscheme for your terminal so that the colors defined by the cterm calls match the gui ones. Here's an example .Xresources file that you can use. Plug it into [terminal.sexy](terminal.sexy) and export to your terminal's format. 42 | 43 | *.foreground: #abb2bf 44 | *.background: #282c34 45 | 46 | *.color0: #282c34 47 | *.color8: #55606d 48 | 49 | *.color1: #e06c75 50 | *.color9: #af5f5f 51 | 52 | *.color2: #87AF87 53 | *.color10: #87AF87 54 | 55 | *.color3: #D7AFAF 56 | *.color11: #FF875F 57 | 58 | *.color4: #6E88A6 59 | *.color12: #6E88A6 60 | 61 | *.color5: #D18EC2 62 | *.color13: #875faf 63 | 64 | *.color6: #5fafaf 65 | *.color14: #5fafaf 66 | 67 | *.color7: #ABB2BF 68 | *.color15: #ECEFF4 69 | 70 | It's also available in the repo as allomancer.Xresources. 71 | 72 | ## Modifying the colorscheme 73 | 74 | Since this is the first iteration of the colorscheme, I don't have a vimrc cway of changing colors. However, it is quite easy to do so yourself. Here's some things you can do: 75 | 76 | 1. Change a specific color. Do this by just changing the corresponding hex value at the start of the colorscheme file 77 | 2. Change the highlighting of some token. Just find the corresponding token and change the associated function arguments (order is: fg,bg,formatting) Remember to check that you remove anything you are changing from the links dictionary if it is in there as the first argument as that will link the token to something else and the links are done last. 78 | 79 | 3. Add highlighting for some token. This can be done by adding a line with the Highlight function and the Highlight group of what you're trying to highlight. 80 | 81 | A quick tip is to add the following to your .vimrc in order to check the highlight group of what your cursor is on when you press F10 (or remap it to some other key): 82 | 83 | map :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' 84 | \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" 85 | \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" 86 | 87 | 88 | ## Screenshots 89 | 90 | Here's some samples of what it looks like for me in gnome-terminal with the [Iosevka](https://github.com/be5invis/Iosevka) font: 91 | 92 | ### Markdown 93 | ![allomancer](/images/allomancer-md.png) 94 | 95 | ### Python 96 | ![allomancer](/images/allomancer-py.png) 97 | 98 | ### Bash 99 | ![allomancer](/images/allomancer-sh.png) 100 | 101 | ### Arduino-C 102 | ![allomancer](/images/allomancer-C.png) 103 | 104 | ### Haskell using [this](https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/haskell.vim) syntax file 105 | ![allomancer](/images/allomancer-hs.png) 106 | -------------------------------------------------------------------------------- /allomancer.Xresources: -------------------------------------------------------------------------------- 1 | *.foreground: #abb2bf 2 | *.background: #282c34 3 | 4 | *.color0: #282c34 5 | *.color8: #55606d 6 | 7 | *.color1: #e06c75 8 | *.color9: #af5f5f 9 | 10 | *.color2: #87AF87 11 | *.color10: #87AF87 12 | 13 | *.color3: #D7AFAF 14 | *.color11: #FF875F 15 | 16 | *.color4: #6E88A6 17 | *.color12: #6E88A6 18 | 19 | *.color5: #D18EC2 20 | *.color13: #875faf 21 | 22 | *.color6: #5fafaf 23 | *.color14: #5fafaf 24 | 25 | *.color7: #ABB2BF 26 | *.color15: #ECEFF4 27 | -------------------------------------------------------------------------------- /colors/allomancer.vim: -------------------------------------------------------------------------------- 1 | " Vim allomancer colors file 2 | " Code file inspired by: 3 | " - https://github.com/patstockwell/vim-monokai-tasty 4 | " - https://github.com/romainl/Apprentice 5 | " 6 | "Author: Nadim Edde 7 | "TODO: Get consistency with colors and tokens 8 | 9 | hi clear "Reset all highlighting to the defaults. Removes all highlighting for groups added by the user 10 | 11 | if exists("syntax_on") 12 | syntax reset 13 | endif 14 | 15 | let g:colors_name = "allomancer" 16 | 17 | " User Options 18 | if !exists("g:allomancer_italic") 19 | let g:allomancer_italic = 0 20 | endif 21 | 22 | if g:allomancer_italic 23 | let s:italic = { "cterm": "italic", "gui": "italic" } 24 | else 25 | let s:italic = { "cterm": "NONE", "gui": "NONE" } 26 | endif 27 | 28 | "Defining UI colors 29 | let s:black = {"cterm":"0", "gui": "#282c34"} "Background color 30 | let s:light_black = {"cterm":"0", "gui": "#2c323c"} 31 | let s:dark_grey = {"cterm":"8", "gui": "#3e4452"} 32 | let s:grey = {"cterm":"8", "gui": "#55606d"} 33 | let s:light_grey = {"cterm": "7", "gui": "#abb2bf"} "Foreground color 34 | let s:white = {"cterm": "NONE", "gui": "#d6e9ff"} 35 | 36 | 37 | "Defining highlighting colors 38 | 39 | let s:light_red = {"cterm": "1", "gui": "#e06c75"} 40 | let s:dark_red = {"cterm": "9", "gui": "#af5f5f"} 41 | let s:orange = {"cterm": "11", "gui": "#FF875F"} 42 | let s:green = {"cterm": "2", "gui": "#87af87"} 43 | let s:aqua = {"cterm": "6", "gui": "#5fafaf"} 44 | let s:blue = {"cterm": "4", "gui": "#6E88A6"} 45 | let s:purple = {"cterm": "5", "gui": "#D18EC2"} 46 | let s:dark_purple = {"cterm": "13", "gui": "#875faf"} "Xterm color palette 97 47 | let s:beige = {"cterm": "3", "gui": "#D7AFAF"} 48 | 49 | "Special text properties 50 | let s:none = { "cterm": "NONE", "gui": "NONE" } 51 | let s:reverse = { "cterm": "reverse", "gui": "reverse" } 52 | let s:bold = { "cterm": "bold", "gui": "bold" } 53 | let s:underline = { "cterm": "underline", "gui": "underline" } 54 | let s:bold_underline = { "cterm": "bold,underline", "gui": "bold,underline" } 55 | 56 | " Helper function to highlight a group 57 | function! Highlight(group, fg, bg, style) 58 | exec "hi " . a:group 59 | \ . " ctermfg=" . a:fg["cterm"] 60 | \ . " ctermbg=" . a:bg["cterm"] 61 | \ . " cterm=" . a:style["cterm"] 62 | \ . " guifg=" . a:fg["gui"] 63 | \ . " guibg=" . a:bg["gui"] 64 | \ . " gui=" . a:style["gui"] 65 | endfunction 66 | 67 | " UI components 68 | call Highlight("Normal", s:light_grey, s:black, s:none) 69 | call Highlight("Visual", s:blue, s:black, s:reverse) 70 | 71 | call Highlight("Cursor", s:black, s:light_grey, s:none) 72 | call Highlight("CursorLine", s:none, s:light_black, s:none) 73 | call Highlight("CursorColumn", s:none, s:light_black, s:none) 74 | call Highlight("CursorLineNr", s:aqua, s:light_black, s:none) 75 | call Highlight("ColorColumn", s:none, s:none, s:none) 76 | call Highlight("Conceal", s:none, s:none, s:none) 77 | 78 | call Highlight("LineNr", s:grey, s:black, s:none) 79 | call Highlight("FoldColumn", s:light_grey, s:black, s:none) 80 | call Highlight("Folded", s:light_grey, s:black, s:none) 81 | call Highlight("MatchParen", s:grey, s:aqua, s:reverse) 82 | 83 | call Highlight("SignColumn", s:light_grey, s:black, s:none) 84 | call Highlight("NonText", s:dark_grey, s:none, s:none) 85 | 86 | " Completion Menu 87 | call Highlight("Pmenu", s:light_grey, s:dark_grey, s:none) 88 | call Highlight("PmenuSel", s:black, s:aqua, s:none) 89 | call Highlight("PmenuSbar", s:none, s:grey, s:none) 90 | call Highlight("PmenuThumb", s:blue, s:beige, s:none) 91 | 92 | " Git diff output 93 | call Highlight("DiffChange", s:dark_purple, s:black, s:reverse) 94 | call Highlight("DiffText", s:orange, s:black, s:reverse) 95 | call Highlight("DiffDelete", s:dark_red, s:black, s:reverse) 96 | call Highlight("DiffAdd", s:green, s:black, s:reverse) 97 | 98 | " Git Gutter 99 | 100 | call Highlight("GitGutterAdd", s:green, s:black, s:none) 101 | call Highlight("GitGutterChange", s:dark_purple, s:black, s:none) 102 | call Highlight("GitGutterDelete", s:dark_red, s:black, s:none) 103 | 104 | " Errors and warnings 105 | call Highlight("Error", s:light_red, s:none, s:reverse) 106 | call Highlight("ErrorMsg", s:black, s:light_red, s:none) 107 | call Highlight("WarningMsg", s:black, s:light_red, s:none) 108 | call Highlight("SpellBad", s:light_red, s:black, s:underline) 109 | call Highlight("SpellRare", s:orange, s:black, s:none) 110 | call Highlight("SpellCap", s:aqua, s:black, s:italic) 111 | call Highlight("SpellLocal", s:green, s:black, s:italic) 112 | 113 | call Highlight("MoreMsg", s:grey, s:black, s:none) 114 | call Highlight("ModeMsg", s:black, s:green, s:none) 115 | call Highlight("Question", s:green, s:black, s:none) 116 | 117 | call Highlight("TabLine", s:blue, s:dark_grey, s:underline) 118 | call Highlight("TabLineSel", s:black, s:blue, s:bold) 119 | call Highlight("TabLineFill", s:dark_grey, s:dark_grey, s:none) 120 | 121 | call Highlight("StatusLine", s:black, s:blue, s:none) 122 | call Highlight("StatusLineNC", s:black, s:grey, s:none) 123 | call Highlight("StatusLineTerm", s:black, s:blue, s:none) 124 | call Highlight("StatusLineTermNC", s:black, s:grey, s:none) 125 | 126 | call Highlight("VertSplit", s:dark_grey, s:dark_grey, s:none) 127 | call Highlight("WildMenu", s:black, s:orange, s:none) 128 | 129 | call Highlight("IncSearch", s:black, s:dark_red, s:bold_underline) 130 | call Highlight("Search", s:black, s:aqua, s:bold_underline) 131 | 132 | 133 | call Highlight("Comment", s:grey, s:none, s:none) 134 | call Highlight("Constant", s:orange, s:black, s:none) 135 | call Highlight("Identifier", s:blue, s:black, s:none) 136 | call Highlight("Function", s:beige, s:black, s:none) 137 | call Highlight("Ignore", s:none, s:none, s:none) 138 | call Highlight("PreProc", s:aqua, s:black, s:none) 139 | call Highlight("Special", s:green, s:black, s:none) 140 | call Highlight("Statement", s:dark_red, s:black, s:none) 141 | call Highlight("String", s:green, s:black, s:none) 142 | call Highlight("Todo", s:purple, s:black, s:reverse) 143 | call Highlight("Type", s:dark_purple, s:black, s:none) 144 | call Highlight("StorageClass", s:light_red, s:black, s:none) 145 | call Highlight("TypeDef", s:purple, s:black, s:none) 146 | call Highlight("Underlined", s:aqua, s:black, s:underline) 147 | call Highlight("SpecialKey", s:grey, s:black, s:none) 148 | call Highlight("Title", s:white, s:black, s:none) 149 | 150 | "Haskell (https://raw.githubusercontent.com/sdiehl/haskell-vim-proto/master/vim/syntax/haskell.vim) 151 | call Highlight("ConId", s:beige, s:black, s:none) 152 | call Highlight("hsType", s:purple, s:black, s:none) 153 | 154 | "Markdown 155 | call Highlight("markdownBold", s:white, s:black, s:bold) 156 | call Highlight("markdownH1", s:green, s:black, s:bold) 157 | call Highlight("markdownHeadingDelimiter", s:orange, s:black, s:bold) 158 | call Highlight("markdownLinkText", s:blue, s:black, s:none) 159 | 160 | "Startify 161 | call Highlight("StartifyPath", s:grey, s:black, s:none) 162 | call Highlight("StartifyFile", s:light_grey, s:black, s:none) 163 | call Highlight("StartifyHeader", s:green, s:black, s:none) 164 | 165 | "NERDTree 166 | call Highlight("NERDTreeDir", s:blue, s:black, s:none) 167 | call Highlight("NERDTreeUp", s:blue, s:black, s:none) 168 | 169 | "netrw 170 | call Highlight("netrwDir", s:blue, s:black, s:none) 171 | 172 | 173 | let links = [ 174 | \ ['Boolean', 'Constant'], 175 | \ ['Character', 'Constant'], 176 | \ ['Conditional', 'Statement'], 177 | \ ['Debug', 'Special'], 178 | \ ['Define', 'PreProc'], 179 | \ ['Delimiter', 'Special'], 180 | \ ['Exception', 'Statement'], 181 | \ ['Float', 'Number'], 182 | \ ['HelpCommand', 'Statement'], 183 | \ ['HelpExample', 'Statement'], 184 | \ ['Include', 'PreProc'], 185 | \ ['Keyword', 'Statement'], 186 | \ ['Label', 'Statement'], 187 | \ ['Macro', 'PreProc'], 188 | \ ['Number', 'Constant'], 189 | \ ['Operator', 'Statement'], 190 | \ ['PreCondit', 'PreProc'], 191 | \ ['Repeat', 'Statement'], 192 | \ ['SpecialChar', 'Special'], 193 | \ ['SpecialComment', 'Special'], 194 | \ ['Structure', 'Type'], 195 | \ ['Tag', 'Special'], 196 | \ ['Terminal', 'Normal'], 197 | \ ['htmlEndTag', 'htmlTagName'], 198 | \ ['htmlLink', 'Function'], 199 | \ ['htmlSpecialTagName', 'htmlTagName'], 200 | \ ['htmlTag', 'htmlTagName'], 201 | \ ['htmlBold', 'Normal'], 202 | \ ['htmlItalic', 'Normal'], 203 | \ ['xmlTag', 'Statement'], 204 | \ ['xmlTagName', 'Statement'], 205 | \ ['xmlEndTag', 'Statement'], 206 | \ ['markdownItalic', 'Preproc'], 207 | \ ['markdownH2', 'markDownH1'], 208 | \ ['markdownH3', 'markDownH1'], 209 | \ ['markdownH4', 'markDownH1'], 210 | \ ['markdownH5', 'markDownH1'], 211 | \ ['markdownH6', 'markDownH1'], 212 | \ ['asciidocQuotedEmphasized', 'Preproc'], 213 | \ ['diffBDiffer', 'WarningMsg'], 214 | \ ['diffCommon', 'WarningMsg'], 215 | \ ['diffDiffer', 'WarningMsg'], 216 | \ ['diffIdentical', 'WarningMsg'], 217 | \ ['diffIsA', 'WarningMsg'], 218 | \ ['diffNoEOL', 'WarningMsg'], 219 | \ ['diffOnly', 'WarningMsg'], 220 | \ ['diffRemoved', 'WarningMsg'], 221 | \ ['diffAdded', 'String'], 222 | \ ['pdcHeader', 'markdownH1'], 223 | \ ['pdcemphasis', 'markdownBold'], 224 | \ ['pythonBuiltin', 'Function'], 225 | \ ['Directory', 'Function'], 226 | \ ] 227 | augroup Allomancer 228 | autocmd! 229 | autocmd ColorScheme * if expand("") == "allomancer" | for link in links | execute 'hi link' link[0] link[1] | endfor | else | for link in links | execute 'hi link' link[0] 'NONE' | endfor | endif 230 | augroup END 231 | -------------------------------------------------------------------------------- /images/allomancer-C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nequo/vim-allomancer/ea5f7c26f119116b14ff66b48117a542a9b4103f/images/allomancer-C.png -------------------------------------------------------------------------------- /images/allomancer-hs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nequo/vim-allomancer/ea5f7c26f119116b14ff66b48117a542a9b4103f/images/allomancer-hs.png -------------------------------------------------------------------------------- /images/allomancer-md.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nequo/vim-allomancer/ea5f7c26f119116b14ff66b48117a542a9b4103f/images/allomancer-md.png -------------------------------------------------------------------------------- /images/allomancer-py.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nequo/vim-allomancer/ea5f7c26f119116b14ff66b48117a542a9b4103f/images/allomancer-py.png -------------------------------------------------------------------------------- /images/allomancer-sh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nequo/vim-allomancer/ea5f7c26f119116b14ff66b48117a542a9b4103f/images/allomancer-sh.png -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nequo/vim-allomancer/ea5f7c26f119116b14ff66b48117a542a9b4103f/images/logo.png --------------------------------------------------------------------------------