├── LICENSE ├── README.md ├── colors └── off.vim └── shot.png /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2021 Patrick Brisbin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vim-colors-off 2 | 3 | For a number of weeks, I ran vim with `syntax off`. It was quite nice, 4 | with only two annoyances: 5 | 6 | - Bright white on jet black was a bit off-putting. 7 | - There were cases when I did miss the lack of color, vimdiff for 8 | example. 9 | 10 | Therefore, I aimed to find or create a colorscheme to solve these two 11 | issues. 12 | 13 | The result is very much based on the [pencil][] colorscheme, which is 14 | surprising because it's a very colorful colorscheme, but: 15 | 16 | - It uses a very sane approach to defining and setting colors 17 | - It has nice background and foreground colors 18 | - In the areas where I do want color, I like how it colors things 19 | 20 | [pencil]: https://github.com/reedes/vim-colors-pencil 21 | 22 | ![Screenshot](shot.png) 23 | 24 | ## Installation 25 | 26 | - Use your preferred plugin manager 27 | - Add "pbrisbin/vim-colors-off" as a plugin 28 | 29 | ## Usage 30 | 31 | ``` 32 | :colorscheme off 33 | ``` 34 | 35 | Supports both `background=light` and `background=dark`. 36 | 37 | ## Options 38 | 39 | - `g:colors_off_a_little`: Set to `1` to bring back _a little_ color, here and there. Default `0`. 40 | 41 | ## Trouble-shooting 42 | 43 | **Plugin fails to update**: we recently switched our default branch; this can confuse 44 | some existing checkouts. The solution is to remove and re-add the plugin. How do to that 45 | depends on the plugin manager you use. 46 | 47 | --- 48 | 49 | [LICENSE](./LICENSE) 50 | -------------------------------------------------------------------------------- /colors/off.vim: -------------------------------------------------------------------------------- 1 | " Name: off.vim 2 | " Version: 0.1 3 | " Maintainer: github.com/pbrisbin 4 | " License: The MIT License (MIT) 5 | " 6 | " A colorscheme meant to look like a more pleasant version of syntax off. 7 | " Structure and what little color there is is taken from pencil.vim 8 | " 9 | " https://github.com/reedes/vim-colors-pencil 10 | " 11 | """ 12 | hi clear 13 | 14 | if exists('syntax on') 15 | syntax reset 16 | endif 17 | 18 | let g:colors_name='off' 19 | let colors_off_a_little = get(g:, 'colors_off_a_little', 0) 20 | 21 | let s:black = { "gui": "#212121", "cterm": "0" } 22 | let s:medium_gray = { "gui": "#767676", "cterm": "243" } 23 | let s:white = { "gui": "#F1F1F1", "cterm": "15" } 24 | let s:actual_white = { "gui": "#FFFFFF", "cterm": "231" } 25 | let s:light_black = { "gui": "#424242", "cterm": "8" } 26 | let s:lighter_black = { "gui": "#545454", "cterm": "240" } 27 | let s:subtle_black = { "gui": "#303030", "cterm": "236" } 28 | let s:light_gray = { "gui": "#B2B2B2", "cterm": "249" } 29 | let s:lighter_gray = { "gui": "#C6C6C6", "cterm": "251" } 30 | let s:subtle_gray = { "gui": "#696969", "cterm": "250" } 31 | let s:pink = { "gui": "#fb007a", "cterm": "9" } 32 | let s:dark_red = { "gui": "#C30771", "cterm": "1" } 33 | let s:light_red = { "gui": "#E32791", "cterm": "1" } 34 | let s:orange = { "gui": "#D75F5F", "cterm": "167" } 35 | let s:darker_blue = { "gui": "#005F87", "cterm": "18" } 36 | let s:dark_blue = { "gui": "#008EC4", "cterm": "4" } 37 | let s:blue = { "gui": "#20BBFC", "cterm": "12" } 38 | let s:light_blue = { "gui": "#b6d6fd", "cterm": "153" } 39 | let s:dark_cyan = { "gui": "#20A5BA", "cterm": "6" } 40 | let s:light_cyan = { "gui": "#4FB8CC", "cterm": "14" } 41 | let s:dark_green = { "gui": "#10A778", "cterm": "2" } 42 | let s:light_green = { "gui": "#5FD7A7", "cterm": "10" } 43 | let s:dark_purple = { "gui": "#523C79", "cterm": "5" } 44 | let s:light_purple = { "gui": "#6855DE", "cterm": "13" } 45 | let s:yellow = { "gui": "#F3E430", "cterm": "11" } 46 | let s:dark_yellow = { "gui": "#A89C14", "cterm": "3" } 47 | 48 | if &background == "dark" 49 | let s:bg = s:black 50 | let s:bg_subtle = s:light_black 51 | let s:bg_subtle_comment = s:subtle_gray 52 | let s:bg_very_subtle = s:subtle_black 53 | let s:norm = s:lighter_gray 54 | let s:norm_subtle = s:light_gray 55 | let s:purple = s:light_purple 56 | let s:cyan = s:light_cyan 57 | let s:green = s:light_green 58 | let s:red = s:light_red 59 | let s:visual = s:lighter_black 60 | else 61 | let s:bg = s:actual_white 62 | let s:bg_subtle = s:light_gray 63 | let s:bg_subtle_comment = s:subtle_gray 64 | let s:bg_very_subtle = s:lighter_gray 65 | let s:norm = s:light_black 66 | let s:norm_subtle = s:lighter_black 67 | let s:purple = s:dark_purple 68 | let s:cyan = s:dark_cyan 69 | let s:green = s:dark_green 70 | let s:red = s:dark_red 71 | let s:visual = s:light_blue 72 | endif 73 | 74 | " https://github.com/noahfrederick/vim-hemisu/ 75 | function! s:h(group, style) 76 | execute "highlight" a:group 77 | \ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE") 78 | \ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE") 79 | \ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE") 80 | \ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE") 81 | \ "ctermfg=" (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE") 82 | \ "ctermbg=" (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE") 83 | \ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE") 84 | endfunction 85 | 86 | call s:h("Normal", {"bg": s:bg, "fg": s:norm}) 87 | call s:h("Cursor", {"bg": s:blue, "fg": s:norm }) 88 | call s:h("Comment", {"fg": s:bg_subtle_comment, "gui": "italic"}) 89 | 90 | "call s:h("Constant", {"fg": s:cyan}) 91 | hi! link Constant Normal 92 | hi! link Character Constant 93 | hi! link Number Constant 94 | hi! link Boolean Constant 95 | hi! link Float Constant 96 | hi! link String Constant 97 | 98 | "call s:h("Identifier", {"fg": s:dark_blue}) 99 | hi! link Identifier Normal 100 | hi! link Function Identifier 101 | 102 | "call s:h("Statement", {"fg": s:green}) 103 | hi! link Statement Normal 104 | hi! link Conditonal Statement 105 | hi! link Repeat Statement 106 | hi! link Label Statement 107 | hi! link Operator Statement 108 | hi! link Keyword Statement 109 | hi! link Exception Statement 110 | 111 | "call s:h("PreProc", {"fg": s:red}) 112 | hi! link PreProc Normal 113 | hi! link Include PreProc 114 | hi! link Define PreProc 115 | hi! link Macro PreProc 116 | hi! link PreCondit PreProc 117 | 118 | "call s:h("Type", {"fg": s:purple}) 119 | hi! link Type Normal 120 | hi! link StorageClass Type 121 | hi! link Structure Type 122 | hi! link Typedef Type 123 | 124 | "call s:h("Special", {"fg": s:pink}) 125 | hi! link Special Normal 126 | hi! link SpecialChar Special 127 | hi! link Tag Special 128 | hi! link Delimiter Special 129 | hi! link SpecialComment Special 130 | hi! link Debug Special 131 | 132 | call s:h("Underlined", {"fg": s:norm, "gui": "underline", "cterm": "underline"}) 133 | call s:h("Ignore", {"fg": s:bg}) 134 | call s:h("Error", {"fg": s:actual_white, "bg": s:red, "cterm": "bold"}) 135 | call s:h("Todo", {"fg": s:actual_white, "bg": s:pink, "gui": "bold", "cterm": "bold"}) 136 | call s:h("SpecialKey", {"fg": s:light_green}) 137 | call s:h("NonText", {"fg": s:medium_gray}) 138 | call s:h("Directory", {"fg": s:dark_blue}) 139 | call s:h("ErrorMsg", {"fg": s:pink}) 140 | call s:h("IncSearch", {"bg": s:yellow, "fg": s:light_black}) 141 | call s:h("Search", {"bg": s:bg_subtle, "fg": s:norm}) 142 | call s:h("MoreMsg", {"fg": s:medium_gray, "cterm": "bold", "gui": "bold"}) 143 | hi! link ModeMsg MoreMsg 144 | call s:h("LineNr", {"fg": s:bg_subtle}) 145 | call s:h("CursorLineNr", {"fg": s:blue, "bg": s:bg_very_subtle}) 146 | call s:h("Question", {"fg": s:red}) 147 | call s:h("StatusLine", {"bg": s:bg_very_subtle}) 148 | call s:h("StatusLineNC", {"bg": s:bg_very_subtle, "fg": s:medium_gray}) 149 | call s:h("VertSplit", {"bg": s:bg_very_subtle, "fg": s:bg_very_subtle}) 150 | call s:h("Title", {"fg": s:dark_blue}) 151 | call s:h("Visual", {"bg": s:visual}) 152 | call s:h("VisualNOS", {"bg": s:bg_subtle}) 153 | call s:h("WarningMsg", {"fg": s:red}) 154 | call s:h("WildMenu", {"fg": s:bg, "bg": s:norm}) 155 | call s:h("Folded", {"fg": s:medium_gray}) 156 | call s:h("FoldColumn", {"fg": s:bg_subtle}) 157 | call s:h("DiffAdd", {"fg": s:green}) 158 | call s:h("DiffDelete", {"fg": s:red}) 159 | call s:h("DiffChange", {"fg": s:dark_yellow}) 160 | call s:h("DiffText", {"fg": s:dark_blue}) 161 | call s:h("SignColumn", {"fg": s:light_green}) 162 | 163 | if has("gui_running") 164 | call s:h("SpellBad", {"gui": "underline", "sp": s:red}) 165 | call s:h("SpellCap", {"gui": "underline", "sp": s:light_green}) 166 | call s:h("SpellRare", {"gui": "underline", "sp": s:pink}) 167 | call s:h("SpellLocal", {"gui": "underline", "sp": s:dark_green}) 168 | else 169 | call s:h("SpellBad", {"cterm": "underline", "fg": s:red}) 170 | call s:h("SpellCap", {"cterm": "underline", "fg": s:light_green}) 171 | call s:h("SpellRare", {"cterm": "underline", "fg": s:pink}) 172 | call s:h("SpellLocal", {"cterm": "underline", "fg": s:dark_green}) 173 | endif 174 | 175 | call s:h("Pmenu", {"fg": s:norm, "bg": s:bg_subtle}) 176 | call s:h("PmenuSel", {"fg": s:norm, "bg": s:blue}) 177 | call s:h("PmenuSbar", {"fg": s:norm, "bg": s:bg_subtle}) 178 | call s:h("PmenuThumb", {"fg": s:norm, "bg": s:bg_subtle}) 179 | call s:h("TabLine", {"fg": s:norm, "bg": s:bg_very_subtle}) 180 | call s:h("TabLineSel", {"fg": s:blue, "bg": s:bg_subtle, "gui": "bold", "cterm": "bold"}) 181 | call s:h("TabLineFill", {"fg": s:norm, "bg": s:bg_very_subtle}) 182 | call s:h("CursorColumn", {"bg": s:bg_very_subtle}) 183 | call s:h("CursorLine", {"fg": s:norm, "bg": s:bg_very_subtle}) 184 | call s:h("ColorColumn", {"bg": s:bg_subtle}) 185 | 186 | call s:h("MatchParen", {"bg": s:bg_subtle, "fg": s:norm}) 187 | call s:h("qfLineNr", {"fg": s:medium_gray}) 188 | 189 | call s:h("htmlH1", {"bg": s:bg, "fg": s:norm}) 190 | call s:h("htmlH2", {"bg": s:bg, "fg": s:norm}) 191 | call s:h("htmlH3", {"bg": s:bg, "fg": s:norm}) 192 | call s:h("htmlH4", {"bg": s:bg, "fg": s:norm}) 193 | call s:h("htmlH5", {"bg": s:bg, "fg": s:norm}) 194 | call s:h("htmlH6", {"bg": s:bg, "fg": s:norm}) 195 | 196 | hi link diffRemoved DiffDelete 197 | hi link diffAdded DiffAdd 198 | 199 | " Signify, git-gutter 200 | hi link SignifySignAdd LineNr 201 | hi link SignifySignDelete LineNr 202 | hi link SignifySignChange LineNr 203 | if colors_off_a_little 204 | hi! GitGutterAdd guifg=#10A778 ctermfg=2 205 | hi! GitGutterChange guifg=#A89C14 ctermfg=3 206 | hi! GitGutterDelete guifg=#C30771 ctermfg=1 207 | hi! GitGutterChangeDelete guifg=#C30771 ctermfg=1 208 | else 209 | hi link GitGutterAdd LineNr 210 | hi link GitGutterDelete LineNr 211 | hi link GitGutterChange LineNr 212 | hi link GitGutterChangeDelete LineNr 213 | endif 214 | 215 | " Fuzzy Search, Telescope & CtrlP 216 | if colors_off_a_little 217 | hi! CtrlPMatch ctermbg=235 ctermfg=250 guibg=NONE guifg=#5FD7A7 cterm=NONE gui=NONE 218 | hi! TelescopeMatching guifg=#5FD7A7 guibg=#303030 ctermbg=NONE 219 | highlight TelescopeSelection guifg=NONE gui=bold guibg=#303030 220 | else 221 | hi! CtrlPMatch ctermbg=NONE ctermfg=NONE guibg=NONE guifg=NONE cterm=NONE gui=bold 222 | hi! TelescopeMatching guifg=NONE guibg=NONE ctermbg=NONE 223 | highlight TelescopeSelection guifg=NONE gui=bold guibg=#303030 224 | endif 225 | -------------------------------------------------------------------------------- /shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbrisbin/vim-colors-off/2879dc5d358a4856873ca708399b34a436a0f3ec/shot.png --------------------------------------------------------------------------------