Start cleaning up vim color schemes
This commit is contained in:
		
							parent
							
								
									4238273951
								
							
						
					
					
						commit
						c1e333e7db
					
				| 
						 | 
					@ -1,17 +1,26 @@
 | 
				
			||||||
" A simple dark vim colorscheme.
 | 
					" A simple dark vim colorscheme.
 | 
				
			||||||
" Maintainer: Michael Campagnaro <mikecampo@gmail.com>
 | 
					" Created by Michael Campagnaro (https://git.michael.is)
 | 
				
			||||||
" Version: 1.0
 | 
					 | 
				
			||||||
"
 | 
					 | 
				
			||||||
" The theme file original copied from the Tomorrow theme.
 | 
					 | 
				
			||||||
" See https://github.com/chriskempson/vim-tomorrow-theme.git for it.
 | 
					 | 
				
			||||||
" Hex color conversion functions borrowed from the theme "Desert256".
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
if has('termguicolors')
 | 
					if has('termguicolors')
 | 
				
			||||||
    " Supports 24-bit color range
 | 
					    " Supports 24-bit color range
 | 
				
			||||||
    set termguicolors
 | 
					    set termguicolors
 | 
				
			||||||
    let g:campo_theme_use_rainbow_parens = 0
 | 
					    let g:campo_theme_use_rainbow_parens = 0
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    echoerr "This theme requires 'termguicolors' support!"
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  " Colors
 | 
					if !has("gui_running") && &t_Co != 88 && &t_Co != 256
 | 
				
			||||||
 | 
					    echoerr "Don't have expected color support!"
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set background=dark
 | 
				
			||||||
 | 
					hi clear
 | 
				
			||||||
 | 
					syntax reset
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					source $HOME/.vim/colors/utils
 | 
				
			||||||
 | 
					let g:colors_name = "campo-dark-blue"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Shared colors
 | 
				
			||||||
let s:blue    = "3699cc"
 | 
					let s:blue    = "3699cc"
 | 
				
			||||||
let s:purple  = "ce93d8"
 | 
					let s:purple  = "ce93d8"
 | 
				
			||||||
let s:grey    = "b0bec5"
 | 
					let s:grey    = "b0bec5"
 | 
				
			||||||
| 
						 | 
					@ -19,395 +28,136 @@ if has('termguicolors')
 | 
				
			||||||
let s:yellow  = "fff176"
 | 
					let s:yellow  = "fff176"
 | 
				
			||||||
let s:green   = "88b888"
 | 
					let s:green   = "88b888"
 | 
				
			||||||
let s:red     = "ef2929"
 | 
					let s:red     = "ef2929"
 | 
				
			||||||
  let s:text   = "f1f1e8"
 | 
					let s:text    = "f1f1e8" " A majority of the syntax will use this.
 | 
				
			||||||
 | 
					let s:bg      = "072730"
 | 
				
			||||||
  let s:foreground           = s:text " A majority of the syntax will use this, including variables in C/C++.
 | 
					let s:select  = "546e8f"
 | 
				
			||||||
  let s:background           = "072730"
 | 
					 | 
				
			||||||
  let s:selection            = "546e8f"
 | 
					 | 
				
			||||||
let s:window  = "37474f"
 | 
					let s:window  = "37474f"
 | 
				
			||||||
  let s:line                 = "034a4a"
 | 
					 | 
				
			||||||
  let s:color_column         = "034a4a" " Vertical line set by colorcolumn option.
 | 
					 | 
				
			||||||
  let s:cursor_line          = "023940" " Horizontal line at the cursor.
 | 
					 | 
				
			||||||
  let s:cursor_column        = "023940" " Vertical line at the cursor.
 | 
					 | 
				
			||||||
  let s:active_tab_bg        = s:background
 | 
					 | 
				
			||||||
  let s:active_tab_fg        = s:text
 | 
					 | 
				
			||||||
  let s:inactive_tab_bg      = s:line
 | 
					 | 
				
			||||||
  let s:inactive_tab_fg      = "dddddd"
 | 
					 | 
				
			||||||
  let s:tab_line_bg          = s:inactive_tab_bg
 | 
					 | 
				
			||||||
  let s:bad_spelling         = "ee877d"
 | 
					 | 
				
			||||||
  let s:todo                 = "b8fbb0"
 | 
					 | 
				
			||||||
  let s:bugs                 = "b8fbb0"
 | 
					 | 
				
			||||||
  let s:error_msg_background = s:background
 | 
					 | 
				
			||||||
  let s:error_msg_foreground = "e40e0e"
 | 
					 | 
				
			||||||
  let s:function_name        = "0eefcb"
 | 
					 | 
				
			||||||
  let s:pre_processor        = s:text
 | 
					 | 
				
			||||||
  let s:define               = "a5bce4"
 | 
					 | 
				
			||||||
  let s:struct               = "ae90ea"
 | 
					 | 
				
			||||||
  let s:variable             = s:text
 | 
					 | 
				
			||||||
  let s:number               = s:text
 | 
					 | 
				
			||||||
  let s:repeat               = s:text " 'for' and 'while'
 | 
					 | 
				
			||||||
  let s:statement            = s:text " 'return', 'goto', 'case', 'break', etc
 | 
					 | 
				
			||||||
  let s:identifier           = s:grey
 | 
					 | 
				
			||||||
  let s:type                 = s:text " Data types
 | 
					 | 
				
			||||||
  let s:include              = s:text " #include in C/C++
 | 
					 | 
				
			||||||
  let s:string               = s:text
 | 
					 | 
				
			||||||
let s:comment = "5dea82"
 | 
					let s:comment = "5dea82"
 | 
				
			||||||
  let s:constant             = s:text " Constants, e.g. SOME_CONST
 | 
					let s:tab     = "03404a"
 | 
				
			||||||
  let s:boolean              = s:text " true, false
 | 
					let s:cursor  = "023940"
 | 
				
			||||||
else
 | 
					let s:error   = "e40e0e"
 | 
				
			||||||
  echoerr "This theme requires 'termguicolors' support!"
 | 
					let s:proc    = "0eefcb"
 | 
				
			||||||
endif
 | 
					let s:warn    = "dcd53e"
 | 
				
			||||||
 | 
					let s:spell   = "aaf53e"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set background=dark
 | 
					" Vim
 | 
				
			||||||
hi clear
 | 
					call X("Normal",                 s:text,    s:bg,      "")
 | 
				
			||||||
if exists("syntax_on")
 | 
					call X("LineNr",                 s:grey,    "",        "")
 | 
				
			||||||
    syntax reset
 | 
					call X("NonText",                s:text,    "",        "")
 | 
				
			||||||
endif
 | 
					call X("SpecialKey",             s:blue,    "",        "")
 | 
				
			||||||
 | 
					call X("Search",                 s:text,    s:select,  "")
 | 
				
			||||||
let g:colors_name = "campo-dark-blue"
 | 
					call X("TabLineSel",             s:text,    s:bg,      "bold")
 | 
				
			||||||
 | 
					call X("TabLine",                "dddddd",  s:tab,     "none")
 | 
				
			||||||
if has("gui_running") || &t_Co == 88 || &t_Co == 256
 | 
					call X("TabLineFill",            "",        s:tab,     "none") " The tab line region that doesn't contain tab entries.
 | 
				
			||||||
    " Returns an approximate grey index for the given grey level
 | 
					call X("StatusLine",             s:window,  s:text,    "reverse")
 | 
				
			||||||
    fun <SID>grey_number(x)
 | 
					call X("StatusLineNC",           s:window,  s:comment, "reverse")
 | 
				
			||||||
        if &t_Co == 88
 | 
					call X("VertSplit",              s:window,  s:window,  "none")
 | 
				
			||||||
            if a:x < 23
 | 
					call X("Visual",                 "",        s:select,  "")
 | 
				
			||||||
                return 0
 | 
					call X("Directory",              s:blue,    "",        "")
 | 
				
			||||||
            elseif a:x < 69
 | 
					call X("ModeMsg",                s:green,   "",        "")
 | 
				
			||||||
                return 1
 | 
					call X("MoreMsg",                s:green,   "",        "")
 | 
				
			||||||
            elseif a:x < 103
 | 
					call X("Question",               s:green,   "",        "")
 | 
				
			||||||
                return 2
 | 
					call X("MatchParen",             "",        s:select,  "")
 | 
				
			||||||
            elseif a:x < 127
 | 
					call X("Folded",                 s:comment, s:bg,      "")
 | 
				
			||||||
                return 3
 | 
					call X("FoldColumn",             s:comment, s:bg,      "")
 | 
				
			||||||
            elseif a:x < 150
 | 
					call X("SpellBad",               s:spell,   s:bg,      "bold")
 | 
				
			||||||
                return 4
 | 
					call X("SpellCap",               s:spell,   s:bg,      "bold") " A word that should start with a capital
 | 
				
			||||||
            elseif a:x < 173
 | 
					call X("SpellLocal",             s:spell,   s:bg,      "bold") " Correctly spelled but used in another region.
 | 
				
			||||||
                return 5
 | 
					call X("SpellRare",              s:text,    s:bg,      "")     " A correctly spelled that is hardly ever used. Don't care about this.
 | 
				
			||||||
            elseif a:x < 196
 | 
					call X("ErrorMsg",               s:error,   s:bg,      "bold")
 | 
				
			||||||
                return 6
 | 
					 | 
				
			||||||
            elseif a:x < 219
 | 
					 | 
				
			||||||
                return 7
 | 
					 | 
				
			||||||
            elseif a:x < 243
 | 
					 | 
				
			||||||
                return 8
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                return 9
 | 
					 | 
				
			||||||
            endif
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
            if a:x < 14
 | 
					 | 
				
			||||||
                return 0
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                let l:n = (a:x - 8) / 10
 | 
					 | 
				
			||||||
                let l:m = (a:x - 8) % 10
 | 
					 | 
				
			||||||
                if l:m < 5
 | 
					 | 
				
			||||||
                    return l:n
 | 
					 | 
				
			||||||
                else
 | 
					 | 
				
			||||||
                    return l:n + 1
 | 
					 | 
				
			||||||
                endif
 | 
					 | 
				
			||||||
            endif
 | 
					 | 
				
			||||||
        endif
 | 
					 | 
				
			||||||
    endfun
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    " Returns the actual grey level represented by the grey index
 | 
					 | 
				
			||||||
    fun <SID>grey_level(n)
 | 
					 | 
				
			||||||
        if &t_Co == 88
 | 
					 | 
				
			||||||
            if a:n == 0
 | 
					 | 
				
			||||||
                return 0
 | 
					 | 
				
			||||||
            elseif a:n == 1
 | 
					 | 
				
			||||||
                return 46
 | 
					 | 
				
			||||||
            elseif a:n == 2
 | 
					 | 
				
			||||||
                return 92
 | 
					 | 
				
			||||||
            elseif a:n == 3
 | 
					 | 
				
			||||||
                return 115
 | 
					 | 
				
			||||||
            elseif a:n == 4
 | 
					 | 
				
			||||||
                return 139
 | 
					 | 
				
			||||||
            elseif a:n == 5
 | 
					 | 
				
			||||||
                return 162
 | 
					 | 
				
			||||||
            elseif a:n == 6
 | 
					 | 
				
			||||||
                return 185
 | 
					 | 
				
			||||||
            elseif a:n == 7
 | 
					 | 
				
			||||||
                return 208
 | 
					 | 
				
			||||||
            elseif a:n == 8
 | 
					 | 
				
			||||||
                return 231
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                return 255
 | 
					 | 
				
			||||||
            endif
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
            if a:n == 0
 | 
					 | 
				
			||||||
                return 0
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                return 8 + (a:n * 10)
 | 
					 | 
				
			||||||
            endif
 | 
					 | 
				
			||||||
        endif
 | 
					 | 
				
			||||||
    endfun
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    " Returns the palette index for the given grey index
 | 
					 | 
				
			||||||
    fun <SID>grey_colour(n)
 | 
					 | 
				
			||||||
        if &t_Co == 88
 | 
					 | 
				
			||||||
            if a:n == 0
 | 
					 | 
				
			||||||
                return 16
 | 
					 | 
				
			||||||
            elseif a:n == 9
 | 
					 | 
				
			||||||
                return 79
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                return 79 + a:n
 | 
					 | 
				
			||||||
            endif
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
            if a:n == 0
 | 
					 | 
				
			||||||
                return 16
 | 
					 | 
				
			||||||
            elseif a:n == 25
 | 
					 | 
				
			||||||
                return 231
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                return 231 + a:n
 | 
					 | 
				
			||||||
            endif
 | 
					 | 
				
			||||||
        endif
 | 
					 | 
				
			||||||
    endfun
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    " Returns an approximate colour index for the given colour level
 | 
					 | 
				
			||||||
    fun <SID>rgb_number(x)
 | 
					 | 
				
			||||||
        if &t_Co == 88
 | 
					 | 
				
			||||||
            if a:x < 69
 | 
					 | 
				
			||||||
                return 0
 | 
					 | 
				
			||||||
            elseif a:x < 172
 | 
					 | 
				
			||||||
                return 1
 | 
					 | 
				
			||||||
            elseif a:x < 230
 | 
					 | 
				
			||||||
                return 2
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                return 3
 | 
					 | 
				
			||||||
            endif
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
            if a:x < 75
 | 
					 | 
				
			||||||
                return 0
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                let l:n = (a:x - 55) / 40
 | 
					 | 
				
			||||||
                let l:m = (a:x - 55) % 40
 | 
					 | 
				
			||||||
                if l:m < 20
 | 
					 | 
				
			||||||
                    return l:n
 | 
					 | 
				
			||||||
                else
 | 
					 | 
				
			||||||
                    return l:n + 1
 | 
					 | 
				
			||||||
                endif
 | 
					 | 
				
			||||||
            endif
 | 
					 | 
				
			||||||
        endif
 | 
					 | 
				
			||||||
    endfun
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    " Returns the actual colour level for the given colour index
 | 
					 | 
				
			||||||
    fun <SID>rgb_level(n)
 | 
					 | 
				
			||||||
        if &t_Co == 88
 | 
					 | 
				
			||||||
            if a:n == 0
 | 
					 | 
				
			||||||
                return 0
 | 
					 | 
				
			||||||
            elseif a:n == 1
 | 
					 | 
				
			||||||
                return 139
 | 
					 | 
				
			||||||
            elseif a:n == 2
 | 
					 | 
				
			||||||
                return 205
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                return 255
 | 
					 | 
				
			||||||
            endif
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
            if a:n == 0
 | 
					 | 
				
			||||||
                return 0
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                return 55 + (a:n * 40)
 | 
					 | 
				
			||||||
            endif
 | 
					 | 
				
			||||||
        endif
 | 
					 | 
				
			||||||
    endfun
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    " Returns the palette index for the given R/G/B colour indices
 | 
					 | 
				
			||||||
    fun <SID>rgb_colour(x, y, z)
 | 
					 | 
				
			||||||
        if &t_Co == 88
 | 
					 | 
				
			||||||
            return 16 + (a:x * 16) + (a:y * 4) + a:z
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
            return 16 + (a:x * 36) + (a:y * 6) + a:z
 | 
					 | 
				
			||||||
        endif
 | 
					 | 
				
			||||||
    endfun
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    " Returns the palette index to approximate the given R/G/B colour levels
 | 
					 | 
				
			||||||
    fun <SID>colour(r, g, b)
 | 
					 | 
				
			||||||
        " Get the closest grey
 | 
					 | 
				
			||||||
        let l:gx = <SID>grey_number(a:r)
 | 
					 | 
				
			||||||
        let l:gy = <SID>grey_number(a:g)
 | 
					 | 
				
			||||||
        let l:gz = <SID>grey_number(a:b)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        " Get the closest colour
 | 
					 | 
				
			||||||
        let l:x = <SID>rgb_number(a:r)
 | 
					 | 
				
			||||||
        let l:y = <SID>rgb_number(a:g)
 | 
					 | 
				
			||||||
        let l:z = <SID>rgb_number(a:b)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if l:gx == l:gy && l:gy == l:gz
 | 
					 | 
				
			||||||
            " There are two possibilities
 | 
					 | 
				
			||||||
            let l:dgr = <SID>grey_level(l:gx) - a:r
 | 
					 | 
				
			||||||
            let l:dgg = <SID>grey_level(l:gy) - a:g
 | 
					 | 
				
			||||||
            let l:dgb = <SID>grey_level(l:gz) - a:b
 | 
					 | 
				
			||||||
            let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
 | 
					 | 
				
			||||||
            let l:dr = <SID>rgb_level(l:gx) - a:r
 | 
					 | 
				
			||||||
            let l:dg = <SID>rgb_level(l:gy) - a:g
 | 
					 | 
				
			||||||
            let l:db = <SID>rgb_level(l:gz) - a:b
 | 
					 | 
				
			||||||
            let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
 | 
					 | 
				
			||||||
            if l:dgrey < l:drgb
 | 
					 | 
				
			||||||
                " Use the grey
 | 
					 | 
				
			||||||
                return <SID>grey_colour(l:gx)
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
                " Use the colour
 | 
					 | 
				
			||||||
                return <SID>rgb_colour(l:x, l:y, l:z)
 | 
					 | 
				
			||||||
            endif
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
            " Only one possibility
 | 
					 | 
				
			||||||
            return <SID>rgb_colour(l:x, l:y, l:z)
 | 
					 | 
				
			||||||
        endif
 | 
					 | 
				
			||||||
    endfun
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    " Returns the palette index to approximate the 'rrggbb' hex string
 | 
					 | 
				
			||||||
    fun <SID>rgb(rgb)
 | 
					 | 
				
			||||||
        let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
 | 
					 | 
				
			||||||
        let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
 | 
					 | 
				
			||||||
        let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        return <SID>colour(l:r, l:g, l:b)
 | 
					 | 
				
			||||||
    endfun
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    " Sets the highlighting for the given group
 | 
					 | 
				
			||||||
    fun <SID>X(group, fg, bg, attr)
 | 
					 | 
				
			||||||
        if a:fg != ""
 | 
					 | 
				
			||||||
            exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
 | 
					 | 
				
			||||||
        endif
 | 
					 | 
				
			||||||
        if a:bg != ""
 | 
					 | 
				
			||||||
            exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
 | 
					 | 
				
			||||||
        endif
 | 
					 | 
				
			||||||
        if a:attr != ""
 | 
					 | 
				
			||||||
            exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
 | 
					 | 
				
			||||||
        endif
 | 
					 | 
				
			||||||
    endfun
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    " Vim Highlighting
 | 
					 | 
				
			||||||
    call <SID>X("Normal", s:foreground, s:background, "")
 | 
					 | 
				
			||||||
    call <SID>X("LineNr", s:grey, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("NonText", s:foreground, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("SpecialKey", s:blue, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("Search", s:foreground, s:selection, "")
 | 
					 | 
				
			||||||
    call <SID>X("TabLineSel", s:active_tab_fg, s:active_tab_bg, "bold")
 | 
					 | 
				
			||||||
    call <SID>X("TabLine", s:inactive_tab_fg, s:inactive_tab_bg, "none")
 | 
					 | 
				
			||||||
    call <SID>X("TabLineFill", "", s:tab_line_bg, "none")
 | 
					 | 
				
			||||||
    call <SID>X("StatusLine", s:window, s:foreground, "reverse")
 | 
					 | 
				
			||||||
    call <SID>X("StatusLineNC", s:window, s:comment, "reverse")
 | 
					 | 
				
			||||||
    call <SID>X("VertSplit", s:window, s:window, "none")
 | 
					 | 
				
			||||||
    call <SID>X("Visual", "", s:selection, "")
 | 
					 | 
				
			||||||
    call <SID>X("Directory", s:blue, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("ModeMsg", s:green, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("MoreMsg", s:green, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("Question", s:green, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("WarningMsg", s:red, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("MatchParen", "", s:selection, "")
 | 
					 | 
				
			||||||
    call <SID>X("Folded", s:comment, s:background, "")
 | 
					 | 
				
			||||||
    call <SID>X("FoldColumn", s:comment, s:background, "")
 | 
					 | 
				
			||||||
if version >= 700
 | 
					if version >= 700
 | 
				
			||||||
        call <SID>X("CursorLine", "", s:cursor_line, "none")
 | 
					    call X("PMenu",              s:text,    s:select,  "none") " Autocompletion menu
 | 
				
			||||||
        call <SID>X("CursorColumn", "", s:cursor_column, "none")
 | 
					    call X("PMenuSel",           s:text,    "027990",  "bold") " Selected autocompletion item
 | 
				
			||||||
        call <SID>X("PMenu", s:foreground, s:selection, "none")
 | 
					    call X("SignColumn",         "",        s:bg,      "none")
 | 
				
			||||||
        call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
 | 
					    call X("CursorLine",         "",        s:cursor,  "none") " Horizontal line at the cursor.
 | 
				
			||||||
        call <SID>X("SignColumn", "", s:background, "none")
 | 
					    call X("CursorColumn",       "",        s:cursor,  "none") " Vertical line at the cursor.
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
if version >= 703
 | 
					if version >= 703
 | 
				
			||||||
        call <SID>X("ColorColumn", "", s:color_column, "none")
 | 
					    call X("ColorColumn",        "", "034a4a", "none")         " Vertical line set by colorcolumn option.
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Standard Highlighting
 | 
					" Standard Highlighting
 | 
				
			||||||
    call <SID>X("Comment", s:comment, "", "")
 | 
					call X("Comment",                s:comment, "",     "")
 | 
				
			||||||
    call <SID>X("Title", s:comment, "", "")
 | 
					call X("Title",                  s:comment, "",     "")
 | 
				
			||||||
    call <SID>X("Cursor", "", s:foreground, "")
 | 
					call X("Cursor",                 "",        s:text, "")
 | 
				
			||||||
    call <SID>X("Identifier", s:identifier, "", "none")
 | 
					call X("Identifier",             s:grey,    "",     "none")
 | 
				
			||||||
    call <SID>X("Statement", s:statement, "", "")
 | 
					call X("Statement",              s:text,    "",     "")        " 'return', 'goto', 'case', 'break', etc
 | 
				
			||||||
    call <SID>X("Conditional", s:foreground, "", "")
 | 
					call X("Conditional",            s:text,    "",     "")
 | 
				
			||||||
    call <SID>X("Repeat", s:repeat, "", "")
 | 
					call X("Repeat",                 s:text,    "",     "")        " 'for' and 'while'
 | 
				
			||||||
    call <SID>X("Structure", s:struct, "", "")
 | 
					call X("Structure",              "ae90ea",  "",     "")
 | 
				
			||||||
    call <SID>X("Function", s:function_name, "", "")
 | 
					call X("Function",               s:proc,    "",     "")
 | 
				
			||||||
    call <SID>X("Constant", s:constant, "", "")
 | 
					call X("Constant",               s:text,    "",     "")        " Constants, e.g. SOME_CONST
 | 
				
			||||||
    call <SID>X("Boolean", s:boolean, "", "")
 | 
					call X("Boolean",                s:text,    "",     "")        " true, false
 | 
				
			||||||
    call <SID>X("String", s:string, "", "")
 | 
					call X("String",                 s:text,    "",     "")
 | 
				
			||||||
    call <SID>X("Special", s:foreground, "", "")
 | 
					call X("Special",                s:text,    "",     "")
 | 
				
			||||||
    call <SID>X("PreProc", s:pre_processor, "", "")
 | 
					call X("PreProc",                s:text,    "",     "")
 | 
				
			||||||
    call <SID>X("Operator", s:foreground, "", "none")
 | 
					call X("Operator",               s:text,    "",     "none")
 | 
				
			||||||
    call <SID>X("Type", s:type, "", "")
 | 
					call X("Type",                   s:text,    "",     "")        " Data types
 | 
				
			||||||
    call <SID>X("Define", s:define, "", "none")
 | 
					call X("Define",                 "a5bce4",  "",     "none")
 | 
				
			||||||
    call <SID>X("Include", s:include, "", "")
 | 
					call X("Include",                s:text,    "",     "")        " #include in C/C++
 | 
				
			||||||
    call <SID>X("Number", s:number, "", "")
 | 
					call X("Number",                 s:text,    "",     "")
 | 
				
			||||||
    call <SID>X("SpellBad", s:bad_spelling, s:background, "underline,bold")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    " Custom TODO/NOTE colors
 | 
					" Notes
 | 
				
			||||||
    call <SID>X("Todo", s:todo, s:background, "underline")
 | 
					call X("Todo",                   "b8fbb0",  s:bg, "underline")
 | 
				
			||||||
    call <SID>X("Bugs", s:bugs, s:background, "standout")
 | 
					call X("Bugs",                   "d8fbb0",  s:bg, "standout")
 | 
				
			||||||
    call <SID>X("Notes","ffffff",s:background,"standout")
 | 
					call X("Notes",                  "ffffff",  s:bg, "standout")
 | 
				
			||||||
    call <SID>X("Notices","dcd53e",s:background,"bold")
 | 
					call X("Notices",                s:warn,    s:bg, "bold")
 | 
				
			||||||
    call <SID>X("ErrorMsg", s:error_msg_foreground, s:error_msg_background, "bold")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    " Vim Highlighting
 | 
					" Build markers
 | 
				
			||||||
    call <SID>X("vimCommand", s:text, "", "")
 | 
					call X("BuildError",             s:error,   s:bg, "bold")
 | 
				
			||||||
 | 
					call X("BuildWarn",              s:warn,    s:bg, "bold")
 | 
				
			||||||
 | 
					call X("BuildInfo",              s:text,    s:bg, "bold")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Jai Highlighting
 | 
					" Jai Highlighting
 | 
				
			||||||
    call <SID>X("jaiVariableDeclaration", s:variable, "", "")
 | 
					call X("jaiVariableDeclaration", s:text,    "", "")
 | 
				
			||||||
    call <SID>X("jaiTagNote", s:orange, "", "bold")
 | 
					call X("jaiTagNote",             s:orange,  "", "bold")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" airblade/vim-gitgutter
 | 
				
			||||||
 | 
					call X("GitGutterAdd",           s:green,   "", "")
 | 
				
			||||||
 | 
					call X("GitGutterDelete",        s:red,     "", "")
 | 
				
			||||||
 | 
					call X("GitGutterChange",        s:yellow,  "", "")
 | 
				
			||||||
 | 
					call X("GitGutterChangeDelete",  s:orange,  "", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" C Highlighting
 | 
					" C Highlighting
 | 
				
			||||||
    call <SID>X("cType", s:text, "", "")
 | 
					call X("cType",                  s:text,    "", "")
 | 
				
			||||||
    call <SID>X("cStorageClass", s:text, "", "")
 | 
					call X("cStorageClass",          s:text,    "", "")
 | 
				
			||||||
    call <SID>X("cConditional", s:text, "", "")
 | 
					call X("cConditional",           s:text,    "", "")
 | 
				
			||||||
    call <SID>X("cRepeat", s:text, "", "")
 | 
					call X("cRepeat",                s:text,    "", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Python Highlighting
 | 
					" Python Highlighting
 | 
				
			||||||
    call <SID>X("pythonInclude", s:red, "", "")
 | 
					call X("pythonInclude",          s:red,     "", "")
 | 
				
			||||||
    call <SID>X("pythonStatement", s:blue, "", "")
 | 
					call X("pythonStatement",        s:blue,    "", "")
 | 
				
			||||||
    call <SID>X("pythonConditional", s:purple, "", "")
 | 
					call X("pythonConditional",      s:purple,  "", "")
 | 
				
			||||||
    call <SID>X("pythonRepeat", s:purple, "", "")
 | 
					call X("pythonRepeat",           s:purple,  "", "")
 | 
				
			||||||
    call <SID>X("pythonException", s:purple, "", "")
 | 
					call X("pythonException",        s:purple,  "", "")
 | 
				
			||||||
    call <SID>X("pythonFunction", s:function_name, "", "")
 | 
					call X("pythonFunction",         s:proc,    "", "")
 | 
				
			||||||
    call <SID>X("pythonSelf", s:grey, "", "")
 | 
					call X("pythonSelf",             s:grey,    "", "")
 | 
				
			||||||
    call <SID>X("pythonOperator", s:purple, "", "")
 | 
					call X("pythonOperator",         s:purple,  "", "")
 | 
				
			||||||
    call <SID>X("pythonExtraOperator", s:purple, "", "")
 | 
					call X("pythonExtraOperator",    s:purple,  "", "")
 | 
				
			||||||
    call <SID>X("pythonClass", s:function_name, "", "")
 | 
					call X("pythonClass",            s:proc,    "", "")
 | 
				
			||||||
    call <SID>X("pythonDecorator", s:orange, "", "")
 | 
					call X("pythonDecorator",        s:orange,  "", "")
 | 
				
			||||||
    call <SID>X("pythonDocstring", s:comment, "", "")
 | 
					call X("pythonDocstring",        s:comment, "", "")
 | 
				
			||||||
    call <SID>X("pythonBuiltinObj", s:yellow, "", "")
 | 
					call X("pythonBuiltinObj",       s:yellow,  "", "")
 | 
				
			||||||
    call <SID>X("pythonBuiltinType", s:orange, "", "")
 | 
					call X("pythonBuiltinType",      s:orange,  "", "")
 | 
				
			||||||
    call <SID>X("pythonNumber", s:orange, "", "")
 | 
					call X("pythonNumber",           s:orange,  "", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    " JavaScript Highlighting
 | 
					" JS Highlighting
 | 
				
			||||||
    call <SID>X("javaScriptBraces", s:foreground, "", "")
 | 
					call X("javaScriptBraces",       s:text,    "", "")
 | 
				
			||||||
    call <SID>X("javaScriptFunction", s:purple, "", "")
 | 
					call X("javaScriptFunction",     s:purple,  "", "")
 | 
				
			||||||
    call <SID>X("javaScriptConditional", s:purple, "", "")
 | 
					call X("javaScriptConditional",  s:purple,  "", "")
 | 
				
			||||||
    call <SID>X("javaScriptRepeat", s:purple, "", "")
 | 
					call X("javaScriptRepeat",       s:purple,  "", "")
 | 
				
			||||||
    call <SID>X("javaScriptNumber", s:orange, "", "")
 | 
					call X("javaScriptNumber",       s:orange,  "", "")
 | 
				
			||||||
    call <SID>X("javaScriptMember", s:orange, "", "")
 | 
					call X("javaScriptMember",       s:orange,  "", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" HTML Highlighting
 | 
					" HTML Highlighting
 | 
				
			||||||
    call <SID>X("htmlTag", s:foreground, "", "")
 | 
					call X("htmlTag",                s:text,    "", "")
 | 
				
			||||||
    call <SID>X("htmlTagName", s:foreground, "", "")
 | 
					call X("htmlTagName",            s:text,    "", "")
 | 
				
			||||||
    call <SID>X("htmlArg", s:foreground, "", "")
 | 
					call X("htmlArg",                s:text,    "", "")
 | 
				
			||||||
    call <SID>X("htmlScriptTag", s:blue, "", "")
 | 
					call X("htmlScriptTag",          s:blue,    "", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Diff Highlighting
 | 
					" Diff Highlighting
 | 
				
			||||||
    call <SID>X("diffAdded", "", s:green, "none")
 | 
					call X("DiffAdd",                s:window,  s:green,  "none")
 | 
				
			||||||
    call <SID>X("diffRemoved", "", s:red, "none")
 | 
					call X("DiffDelete",             s:window,  s:red,    "none")
 | 
				
			||||||
    call <SID>X("diffChanged", "", s:yellow, "none")
 | 
					call X("DiffChange",             s:window,  s:yellow, "none")
 | 
				
			||||||
    call <SID>X("DiffAdd", s:window, s:green, "none")
 | 
					call X("DiffText",               s:bg,      s:yellow, "none")
 | 
				
			||||||
    call <SID>X("DiffDelete", s:window, s:red, "none")
 | 
					 | 
				
			||||||
    call <SID>X("DiffChange", s:window, s:yellow, "none")
 | 
					 | 
				
			||||||
    call <SID>X("DiffText", s:background, s:yellow, "none")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    call <SID>X("GitGutterAdd", s:green, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("GitGutterDelete", s:red, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("GitGutterChange", s:yellow, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("GitGutterChangeDelete", s:orange, "", "")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    call <SID>X("VimwikiHeader1", s:red, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("VimwikiHeader2", s:green, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("VimwikiHeader3", s:blue, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("VimwikiHeader4", s:function_name, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("VimwikiHeader5", s:orange, "", "")
 | 
					 | 
				
			||||||
    call <SID>X("VimwikiHeader6", s:yellow, "", "")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    " Delete Functions
 | 
					 | 
				
			||||||
    delf <SID>X
 | 
					 | 
				
			||||||
    delf <SID>rgb
 | 
					 | 
				
			||||||
    delf <SID>colour
 | 
					 | 
				
			||||||
    delf <SID>rgb_colour
 | 
					 | 
				
			||||||
    delf <SID>rgb_level
 | 
					 | 
				
			||||||
    delf <SID>rgb_number
 | 
					 | 
				
			||||||
    delf <SID>grey_colour
 | 
					 | 
				
			||||||
    delf <SID>grey_level
 | 
					 | 
				
			||||||
    delf <SID>grey_number
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -447,9 +447,6 @@ if has("gui_running") || &t_Co == 88 || &t_Co == 256
 | 
				
			||||||
    call <SID>X("bladeKeyword", s:blue, "", "")
 | 
					    call <SID>X("bladeKeyword", s:blue, "", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    " Diff Highlighting
 | 
					    " Diff Highlighting
 | 
				
			||||||
    call <SID>X("diffAdded", "", s:green, "none")
 | 
					 | 
				
			||||||
    call <SID>X("diffRemoved", "", s:red, "none")
 | 
					 | 
				
			||||||
    call <SID>X("diffChanged", "", s:yellow, "none")
 | 
					 | 
				
			||||||
    call <SID>X("DiffAdd", s:window, s:green, "none")
 | 
					    call <SID>X("DiffAdd", s:window, s:green, "none")
 | 
				
			||||||
    call <SID>X("DiffDelete", s:window, s:red, "none")
 | 
					    call <SID>X("DiffDelete", s:window, s:red, "none")
 | 
				
			||||||
    call <SID>X("DiffChange", s:window, s:yellow, "none")
 | 
					    call <SID>X("DiffChange", s:window, s:yellow, "none")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -414,9 +414,6 @@ if has("gui_running") || &t_Co == 88 || &t_Co == 256
 | 
				
			||||||
    call <SID>X("bladeKeyword", s:blue, "", "")
 | 
					    call <SID>X("bladeKeyword", s:blue, "", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    " Diff Highlighting
 | 
					    " Diff Highlighting
 | 
				
			||||||
    call <SID>X("diffAdded", "", s:green, "none")
 | 
					 | 
				
			||||||
    call <SID>X("diffRemoved", "", s:red, "none")
 | 
					 | 
				
			||||||
    call <SID>X("diffChanged", "", s:yellow, "none")
 | 
					 | 
				
			||||||
    call <SID>X("DiffAdd", s:window, s:green, "none")
 | 
					    call <SID>X("DiffAdd", s:window, s:green, "none")
 | 
				
			||||||
    call <SID>X("DiffDelete", s:window, s:red, "none")
 | 
					    call <SID>X("DiffDelete", s:window, s:red, "none")
 | 
				
			||||||
    call <SID>X("DiffChange", s:window, s:yellow, "none")
 | 
					    call <SID>X("DiffChange", s:window, s:yellow, "none")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -432,9 +432,6 @@ if has("gui_running") || &t_Co == 88 || &t_Co == 256
 | 
				
			||||||
    call <SID>X("bladeKeyword", s:blue, "", "")
 | 
					    call <SID>X("bladeKeyword", s:blue, "", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    " Diff Highlighting
 | 
					    " Diff Highlighting
 | 
				
			||||||
    call <SID>X("diffAdded", "", s:green, "none")
 | 
					 | 
				
			||||||
    call <SID>X("diffRemoved", "", s:red, "none")
 | 
					 | 
				
			||||||
    call <SID>X("diffChanged", "", s:yellow, "none")
 | 
					 | 
				
			||||||
    call <SID>X("DiffAdd", s:window, s:green, "none")
 | 
					    call <SID>X("DiffAdd", s:window, s:green, "none")
 | 
				
			||||||
    call <SID>X("DiffDelete", s:window, s:red, "none")
 | 
					    call <SID>X("DiffDelete", s:window, s:red, "none")
 | 
				
			||||||
    call <SID>X("DiffChange", s:window, s:yellow, "none")
 | 
					    call <SID>X("DiffChange", s:window, s:yellow, "none")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -81,8 +81,6 @@ highlight! link Todo Keyword
 | 
				
			||||||
highlight! link Label Keyword
 | 
					highlight! link Label Keyword
 | 
				
			||||||
highlight! link Define Keyword
 | 
					highlight! link Define Keyword
 | 
				
			||||||
highlight! link DiffAdd Keyword
 | 
					highlight! link DiffAdd Keyword
 | 
				
			||||||
highlight! link diffAdded Keyword
 | 
					 | 
				
			||||||
highlight! link diffCommon Keyword
 | 
					 | 
				
			||||||
highlight! link Directory Keyword
 | 
					highlight! link Directory Keyword
 | 
				
			||||||
highlight! link PreCondit Keyword
 | 
					highlight! link PreCondit Keyword
 | 
				
			||||||
highlight! link PreProc Keyword
 | 
					highlight! link PreProc Keyword
 | 
				
			||||||
| 
						 | 
					@ -101,11 +99,9 @@ highlight! link iCursor SpecialKey
 | 
				
			||||||
highlight! link SpellLocal SpellCap
 | 
					highlight! link SpellLocal SpellCap
 | 
				
			||||||
highlight! link NonText NonText
 | 
					highlight! link NonText NonText
 | 
				
			||||||
highlight! link DiffDelete Comment
 | 
					highlight! link DiffDelete Comment
 | 
				
			||||||
highlight! link diffRemoved Comment
 | 
					 | 
				
			||||||
highlight! link PmenuSbar Visual
 | 
					highlight! link PmenuSbar Visual
 | 
				
			||||||
highlight! link VisualNOS Visual
 | 
					highlight! link VisualNOS Visual
 | 
				
			||||||
highlight! link VertSplit VertSplit
 | 
					highlight! link VertSplit VertSplit
 | 
				
			||||||
highlight! link Cursor StatusLine
 | 
					highlight! link Cursor StatusLine
 | 
				
			||||||
highlight! link Underlined SpellRare
 | 
					highlight! link Underlined SpellRare
 | 
				
			||||||
highlight! link rstEmphasis SpellRare
 | 
					highlight! link rstEmphasis SpellRare
 | 
				
			||||||
highlight! link diffChanged DiffChange
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -79,8 +79,6 @@ highlight! link Todo Keyword
 | 
				
			||||||
highlight! link Label Keyword
 | 
					highlight! link Label Keyword
 | 
				
			||||||
highlight! link Define Keyword
 | 
					highlight! link Define Keyword
 | 
				
			||||||
highlight! link DiffAdd Keyword
 | 
					highlight! link DiffAdd Keyword
 | 
				
			||||||
highlight! link diffAdded Keyword
 | 
					 | 
				
			||||||
highlight! link diffCommon Keyword
 | 
					 | 
				
			||||||
highlight! link Directory Keyword
 | 
					highlight! link Directory Keyword
 | 
				
			||||||
highlight! link PreCondit Keyword
 | 
					highlight! link PreCondit Keyword
 | 
				
			||||||
highlight! link PreProc Keyword
 | 
					highlight! link PreProc Keyword
 | 
				
			||||||
| 
						 | 
					@ -100,10 +98,8 @@ highlight! link SpellLocal SpellCap
 | 
				
			||||||
highlight! link LineNr Comment
 | 
					highlight! link LineNr Comment
 | 
				
			||||||
highlight! link NonText NonText
 | 
					highlight! link NonText NonText
 | 
				
			||||||
highlight! link DiffDelete Comment
 | 
					highlight! link DiffDelete Comment
 | 
				
			||||||
highlight! link diffRemoved Comment
 | 
					 | 
				
			||||||
highlight! link VisualNOS Visual
 | 
					highlight! link VisualNOS Visual
 | 
				
			||||||
highlight! link VertSplit VertSplit
 | 
					highlight! link VertSplit VertSplit
 | 
				
			||||||
highlight! link Cursor StatusLine
 | 
					highlight! link Cursor StatusLine
 | 
				
			||||||
highlight! link Underlined SpellRare
 | 
					highlight! link Underlined SpellRare
 | 
				
			||||||
highlight! link rstEmphasis SpellRare
 | 
					highlight! link rstEmphasis SpellRare
 | 
				
			||||||
highlight! link diffChanged DiffChange
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
" A simple light colorscheme.
 | 
					" A simple light colorscheme.
 | 
				
			||||||
" Maintainer: Michael Campagnaro <mikecampo@gmail.com>
 | 
					" Maintainer: Michael Campagnaro
 | 
				
			||||||
" Version: 1.0
 | 
					" Version: 1.0
 | 
				
			||||||
"
 | 
					"
 | 
				
			||||||
" Adapted from https://github.com/tek256/simple-dark
 | 
					" Adapted from https://github.com/tek256/simple-dark
 | 
				
			||||||
| 
						 | 
					@ -81,8 +81,6 @@ highlight! link Todo Keyword
 | 
				
			||||||
highlight! link Label Keyword
 | 
					highlight! link Label Keyword
 | 
				
			||||||
highlight! link Define Keyword
 | 
					highlight! link Define Keyword
 | 
				
			||||||
highlight! link DiffAdd Keyword
 | 
					highlight! link DiffAdd Keyword
 | 
				
			||||||
highlight! link diffAdded Keyword
 | 
					 | 
				
			||||||
highlight! link diffCommon Keyword
 | 
					 | 
				
			||||||
highlight! link Directory Keyword
 | 
					highlight! link Directory Keyword
 | 
				
			||||||
highlight! link PreCondit Keyword
 | 
					highlight! link PreCondit Keyword
 | 
				
			||||||
highlight! link PreProc Keyword
 | 
					highlight! link PreProc Keyword
 | 
				
			||||||
| 
						 | 
					@ -102,10 +100,8 @@ highlight! link SpellLocal SpellCap
 | 
				
			||||||
highlight! link LineNr Comment
 | 
					highlight! link LineNr Comment
 | 
				
			||||||
highlight! link NonText NonText
 | 
					highlight! link NonText NonText
 | 
				
			||||||
highlight! link DiffDelete Comment
 | 
					highlight! link DiffDelete Comment
 | 
				
			||||||
highlight! link diffRemoved Comment
 | 
					 | 
				
			||||||
highlight! link VisualNOS Visual
 | 
					highlight! link VisualNOS Visual
 | 
				
			||||||
highlight! link VertSplit VertSplit
 | 
					highlight! link VertSplit VertSplit
 | 
				
			||||||
highlight! link Cursor StatusLine
 | 
					highlight! link Cursor StatusLine
 | 
				
			||||||
highlight! link Underlined SpellRare
 | 
					highlight! link Underlined SpellRare
 | 
				
			||||||
highlight! link rstEmphasis SpellRare
 | 
					highlight! link rstEmphasis SpellRare
 | 
				
			||||||
highlight! link diffChanged DiffChange
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -377,9 +377,6 @@ if has("gui_running") || &t_Co == 88 || &t_Co == 256
 | 
				
			||||||
    call <SID>X("htmlScriptTag", s:blue, "", "")
 | 
					    call <SID>X("htmlScriptTag", s:blue, "", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    " Diff Highlighting
 | 
					    " Diff Highlighting
 | 
				
			||||||
    call <SID>X("diffAdded", "", s:green, "none")
 | 
					 | 
				
			||||||
    call <SID>X("diffRemoved", "", s:red, "none")
 | 
					 | 
				
			||||||
    call <SID>X("diffChanged", "", s:yellow, "none")
 | 
					 | 
				
			||||||
    call <SID>X("DiffAdd", s:window, s:green, "none")
 | 
					    call <SID>X("DiffAdd", s:window, s:green, "none")
 | 
				
			||||||
    call <SID>X("DiffDelete", s:window, s:red, "none")
 | 
					    call <SID>X("DiffDelete", s:window, s:red, "none")
 | 
				
			||||||
    call <SID>X("DiffChange", s:window, s:yellow, "none")
 | 
					    call <SID>X("DiffChange", s:window, s:yellow, "none")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										209
									
								
								vim/colors/utils
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										209
									
								
								vim/colors/utils
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,209 @@
 | 
				
			||||||
 | 
					" Hex color conversion functions are from https://github.com/vim-scripts/desert256.vim/blob/master/colors/desert256.vim
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Returns an approximate grey index for the given grey level
 | 
				
			||||||
 | 
					function! GreyNumber(x)
 | 
				
			||||||
 | 
					    if &t_Co == 88
 | 
				
			||||||
 | 
					        if a:x < 23
 | 
				
			||||||
 | 
					            return 0
 | 
				
			||||||
 | 
					        elseif a:x < 69
 | 
				
			||||||
 | 
					            return 1
 | 
				
			||||||
 | 
					        elseif a:x < 103
 | 
				
			||||||
 | 
					            return 2
 | 
				
			||||||
 | 
					        elseif a:x < 127
 | 
				
			||||||
 | 
					            return 3
 | 
				
			||||||
 | 
					        elseif a:x < 150
 | 
				
			||||||
 | 
					            return 4
 | 
				
			||||||
 | 
					        elseif a:x < 173
 | 
				
			||||||
 | 
					            return 5
 | 
				
			||||||
 | 
					        elseif a:x < 196
 | 
				
			||||||
 | 
					            return 6
 | 
				
			||||||
 | 
					        elseif a:x < 219
 | 
				
			||||||
 | 
					            return 7
 | 
				
			||||||
 | 
					        elseif a:x < 243
 | 
				
			||||||
 | 
					            return 8
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            return 9
 | 
				
			||||||
 | 
					        endif
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        if a:x < 14
 | 
				
			||||||
 | 
					            return 0
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            let l:n = (a:x - 8) / 10
 | 
				
			||||||
 | 
					            let l:m = (a:x - 8) % 10
 | 
				
			||||||
 | 
					            if l:m < 5
 | 
				
			||||||
 | 
					                return l:n
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					                return l:n + 1
 | 
				
			||||||
 | 
					            endif
 | 
				
			||||||
 | 
					        endif
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					endfun
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Returns the actual grey level represented by the grey index
 | 
				
			||||||
 | 
					function! GreyLevel(n)
 | 
				
			||||||
 | 
					    if &t_Co == 88
 | 
				
			||||||
 | 
					        if a:n == 0
 | 
				
			||||||
 | 
					            return 0
 | 
				
			||||||
 | 
					        elseif a:n == 1
 | 
				
			||||||
 | 
					            return 46
 | 
				
			||||||
 | 
					        elseif a:n == 2
 | 
				
			||||||
 | 
					            return 92
 | 
				
			||||||
 | 
					        elseif a:n == 3
 | 
				
			||||||
 | 
					            return 115
 | 
				
			||||||
 | 
					        elseif a:n == 4
 | 
				
			||||||
 | 
					            return 139
 | 
				
			||||||
 | 
					        elseif a:n == 5
 | 
				
			||||||
 | 
					            return 162
 | 
				
			||||||
 | 
					        elseif a:n == 6
 | 
				
			||||||
 | 
					            return 185
 | 
				
			||||||
 | 
					        elseif a:n == 7
 | 
				
			||||||
 | 
					            return 208
 | 
				
			||||||
 | 
					        elseif a:n == 8
 | 
				
			||||||
 | 
					            return 231
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            return 255
 | 
				
			||||||
 | 
					        endif
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        if a:n == 0
 | 
				
			||||||
 | 
					            return 0
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            return 8 + (a:n * 10)
 | 
				
			||||||
 | 
					        endif
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					endfun
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Returns the palette index for the given grey index
 | 
				
			||||||
 | 
					function! GreyColor(n)
 | 
				
			||||||
 | 
					    if &t_Co == 88
 | 
				
			||||||
 | 
					        if a:n == 0
 | 
				
			||||||
 | 
					            return 16
 | 
				
			||||||
 | 
					        elseif a:n == 9
 | 
				
			||||||
 | 
					            return 79
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            return 79 + a:n
 | 
				
			||||||
 | 
					        endif
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        if a:n == 0
 | 
				
			||||||
 | 
					            return 16
 | 
				
			||||||
 | 
					        elseif a:n == 25
 | 
				
			||||||
 | 
					            return 231
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            return 231 + a:n
 | 
				
			||||||
 | 
					        endif
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					endfun
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Returns an approximate colour index for the given colour level
 | 
				
			||||||
 | 
					function! RGBNumber(x)
 | 
				
			||||||
 | 
					    if &t_Co == 88
 | 
				
			||||||
 | 
					        if a:x < 69
 | 
				
			||||||
 | 
					            return 0
 | 
				
			||||||
 | 
					        elseif a:x < 172
 | 
				
			||||||
 | 
					            return 1
 | 
				
			||||||
 | 
					        elseif a:x < 230
 | 
				
			||||||
 | 
					            return 2
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            return 3
 | 
				
			||||||
 | 
					        endif
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        if a:x < 75
 | 
				
			||||||
 | 
					            return 0
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            let l:n = (a:x - 55) / 40
 | 
				
			||||||
 | 
					            let l:m = (a:x - 55) % 40
 | 
				
			||||||
 | 
					            if l:m < 20
 | 
				
			||||||
 | 
					                return l:n
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					                return l:n + 1
 | 
				
			||||||
 | 
					            endif
 | 
				
			||||||
 | 
					        endif
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					endfun
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Returns the actual colour level for the given colour index
 | 
				
			||||||
 | 
					function! RGBLevel(n)
 | 
				
			||||||
 | 
					    if &t_Co == 88
 | 
				
			||||||
 | 
					        if a:n == 0
 | 
				
			||||||
 | 
					            return 0
 | 
				
			||||||
 | 
					        elseif a:n == 1
 | 
				
			||||||
 | 
					            return 139
 | 
				
			||||||
 | 
					        elseif a:n == 2
 | 
				
			||||||
 | 
					            return 205
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            return 255
 | 
				
			||||||
 | 
					        endif
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        if a:n == 0
 | 
				
			||||||
 | 
					            return 0
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            return 55 + (a:n * 40)
 | 
				
			||||||
 | 
					        endif
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					endfun
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Returns the palette index for the given R/G/B colour indices
 | 
				
			||||||
 | 
					function! RGBColor(x, y, z)
 | 
				
			||||||
 | 
					    if &t_Co == 88
 | 
				
			||||||
 | 
					        return 16 + (a:x * 16) + (a:y * 4) + a:z
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        return 16 + (a:x * 36) + (a:y * 6) + a:z
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					endfun
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Returns the palette index to approximate the given R/G/B colour levels
 | 
				
			||||||
 | 
					function! Color(r, g, b)
 | 
				
			||||||
 | 
					    " Get the closest grey
 | 
				
			||||||
 | 
					    let l:gx = GreyNumber(a:r)
 | 
				
			||||||
 | 
					    let l:gy = GreyNumber(a:g)
 | 
				
			||||||
 | 
					    let l:gz = GreyNumber(a:b)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    " Get the closest colour
 | 
				
			||||||
 | 
					    let l:x = RGBNumber(a:r)
 | 
				
			||||||
 | 
					    let l:y = RGBNumber(a:g)
 | 
				
			||||||
 | 
					    let l:z = RGBNumber(a:b)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if l:gx == l:gy && l:gy == l:gz
 | 
				
			||||||
 | 
					        " There are two possibilities
 | 
				
			||||||
 | 
					        let l:dgr = GreyLevel(l:gx) - a:r
 | 
				
			||||||
 | 
					        let l:dgg = GreyLevel(l:gy) - a:g
 | 
				
			||||||
 | 
					        let l:dgb = GreyLevel(l:gz) - a:b
 | 
				
			||||||
 | 
					        let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
 | 
				
			||||||
 | 
					        let l:dr = RGBLevel(l:gx) - a:r
 | 
				
			||||||
 | 
					        let l:dg = RGBLevel(l:gy) - a:g
 | 
				
			||||||
 | 
					        let l:db = RGBLevel(l:gz) - a:b
 | 
				
			||||||
 | 
					        let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
 | 
				
			||||||
 | 
					        if l:dgrey < l:drgb
 | 
				
			||||||
 | 
					            " Use the grey
 | 
				
			||||||
 | 
					            return GreyColor(l:gx)
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            " Use the colour
 | 
				
			||||||
 | 
					            return RGBColor(l:x, l:y, l:z)
 | 
				
			||||||
 | 
					        endif
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        " Only one possibility
 | 
				
			||||||
 | 
					        return RGBColor(l:x, l:y, l:z)
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					endfun
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Returns the palette index to approximate the 'rrggbb' hex string
 | 
				
			||||||
 | 
					function! RGB(rgb)
 | 
				
			||||||
 | 
					    let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
 | 
				
			||||||
 | 
					    let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
 | 
				
			||||||
 | 
					    let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return Color(l:r, l:g, l:b)
 | 
				
			||||||
 | 
					endfun
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Sets the highlighting for the given group
 | 
				
			||||||
 | 
					function! X(group, fg, bg, attr)
 | 
				
			||||||
 | 
					    if a:fg != ""
 | 
				
			||||||
 | 
					        exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . RGB(a:fg)
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					    if a:bg != ""
 | 
				
			||||||
 | 
					        exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . RGB(a:bg)
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					    if a:attr != ""
 | 
				
			||||||
 | 
					        exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					endfun
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user