<commit_before>" Name:    one vim colorscheme (duplicated inside VimBox, just so plugin
" instal looks nice).
" Author:  <NAME>
" License: MIT
" Version: 1.1.1-pre

" Global setup =============================================================={{{

hi clear
syntax reset
if exists('g:colors_name')
  unlet g:colors_name
endif
let g:colors_name = 'vimBoxColorsDuringLoad'

if !exists('g:one_allow_italics')
  let g:one_allow_italics = 0
endif

let g:hasGuiRunning = has('gui_running')

if has('gui_running') || &t_Co == 88 || &t_Co == 256
  " functions
  " returns an approximate grey index for the given grey level

  " Utility functions -------------------------------------------------------{{{
  fun <SID>grey_number(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
  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_color(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 color index for the given color 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 color level for the given color 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 color indices
  fun <SID>rgb_color(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 color levels
  fun <SID>color(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 color
    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_color(l:gx)
      else
        " use the color
        return <SID>rgb_color(l:x, l:y, l:z)
      endif
    else
      " only one possibility
      return <SID>rgb_color(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>color(l:r, l:g, l:b)
  endfun

  " sets the highlighting for the given group
  fun <sid>X(...)
    let l:groupArg = a:1
    let l:fgArg = a:2
    let l:bgArg = a:3
    let l:attrArg = a:4
    if g:one_allow_italics == 0 && l:attrArg ==? 'italic'
        let l:attrArg= 'none'
    endif

    let l:bg = ""
    let l:fg = ""
    let l:guisp = ""
    let l:decoration = ""

    if l:bgArg != ''
      let l:bg = " guibg=#" . l:bgArg . " ctermbg=" . <SID>rgb(l:bgArg)
    endif

    if l:fgArg != ''
      let l:fg = " guifg=#" . l:fgArg . " ctermfg=" . <SID>rgb(l:fgArg)
    endif

    if l:attrArg != ''
      let l:decoration = " gui=" . l:attrArg . " cterm=" . l:attrArg
    endif

    if g:hasGuiRunning && a:0 >= 5 && a:5 != ''
      let l:guispArg = a:5
      let l:guisp = " guisp=#" . l:guispArg
    endif

    let l:exec = l:fg . l:bg . l:decoration . l:guisp

    if l:exec != ''
      exec "hi " . l:groupArg . l:exec
    endif
  endfun

  "}}}

  " Color definition --------------------------------------------------------{{{
  if &background ==# 'dark'
    let s:mono_1 = 'abb2bf'
    let s:mono_2 = '828997'
    let s:mono_3 = '5c6370'


    let s:hue_1  = '56b6c2' " cyan
    let s:hue_2  = '61afef' " blue
    let s:hue_3  = 'c678dd' " purple
    let s:hue_4  = '98c379' " green

    let s:hue_5   = 'e06c75' " red 1
    let s:hue_5_2 = 'be5046' " red 2

    let s:hue_6   = 'd19a66' " orange 1
    let s:hue_6_2 = 'e5c07b' " orange 2

    let s:syntax_bg     = '282c34'
    let s:syntax_gutter = '636d83'
    let s:syntax_cursor = '2e343e'

    let s:syntax_accent = '528bff'

    let s:vertsplit    = '22262d'
    let s:special_grey = '3b4048'
    " jordwalke: A bit less contrast.
    let s:visual_grey  = '3b414f'
  else
    let s:mono_1 = '494b53'
    let s:mono_2 = '696c77'
    let s:mono_3 = 'a0a1a7'

    let s:hue_1  = '0184bc' " cyan
    let s:hue_1  = '0083be' " cyan
    let s:hue_2  = '4078f2' " blue
    let s:hue_3  = 'a626a4' " purple
    let s:hue_4  = '50a14f' " green

    let s:hue_5   = 'e45649' " red 1
    let s:hue_5_2 = 'ca1243' " red 2

    let s:hue_6   = '986801' " orange 1
    let s:hue_6_2 = 'c18401' " orange 2

    let s:syntax_bg     = 'fafafa'
    let s:syntax_gutter = '9e9e9e'
    let s:syntax_cursor = 'eeeeee'

    let s:syntax_accent = '526fff'
    let s:syntax_accent_2 = '0083be'

    let s:vertsplit    = 'e7e9e1'
    let s:special_grey = 'd3d3d3'
    let s:visual_grey  = 'd0d0d0'
  endif

  let s:syntax_fg = s:mono_1
  let s:syntax_fold_bg = s:mono_3

  "}}}

  " Vim editor color --------------------------------------------------------{{{
  call <sid>X('bold',         '',              '',               'bold')
  call <sid>X('ColorColumn',  '',              s:syntax_cursor,  '')
  call <sid>X('Conceal',      '',              '',               '')
  call <sid>X('Cursor',       s:syntax_bg,     s:hue_2,          '')
  call <sid>X('CursorIM',     '',              '',               '')
  call <sid>X('CursorColumn', '',              s:syntax_cursor,  '')
  call <sid>X('CursorLine',   '',              s:syntax_cursor,  '')
  call <sid>X('Directory',    s:hue_2,         '',               '')
  call <sid>X('ErrorMsg',     s:hue_5,         s:syntax_bg,      'none')
  call <sid>X('VertSplit',    s:vertsplit,     '',               'none')
  call <sid>X('Folded',       s:syntax_bg,     s:syntax_fold_bg, 'none')
  call <sid>X('FoldColumn',   s:mono_3,        s:syntax_cursor,  '')
  call <sid>X('IncSearch',    s:syntax_bg,     s:hue_6_2,        'none')
  call <sid>X('LineNr',       s:syntax_gutter, '',               '')
  call <sid>X('CursorLineNr', s:syntax_fg,     '',               'none')
  call <sid>X('MatchParen',   s:syntax_bg,     s:hue_5,          '')
  call <sid>X('Italic',       '',              '',               'italic')
  call <sid>X('ModeMsg',      s:syntax_fg,     '',               '')
  call <sid>X('MoreMsg',      s:syntax_fg,     '',               '')
  " jordwalke: Hide NonText clutter.
  call <sid>X('NonText',      s:syntax_bg,     s:syntax_bg,      '')
  call <sid>X('PMenu',        '',              s:visual_grey,    '')
  " jordwalke: make the popup stand out just a bit.
  call <sid>X('PMenuSel',     s:syntax_bg,              s:hue_2,  '')
  " jordwalke: Avoid floating scrollbar thumb.
  call <sid>X('PMenuSbar',    '',              s:visual_grey,      '')
  call <sid>X('PMenuThumb',   '',              s:mono_1,         '')
  call <sid>X('Question',     s:hue_2,         '',               '')
  call <sid>X('Search',       s:syntax_bg,     s:hue_6_2,        '')
  call <sid>X('SpecialKey',   s:special_grey,  '',               '')
  call <sid>X('StatusLine',   s:syntax_fg,     s:syntax_cursor,  'none')
  " Remove the ugly grey nub.
  call <sid>X('StatusLineNC', s:syntax_cursor, s:mono_2,               '')
  call <sid>X('TabLine',      s:mono_1,        s:syntax_cursor,      'none')
  call <sid>X('TabLineFill',  s:mono_3,        s:syntax_cursor,  'none')
  call <sid>X('TabLineSel',   s:hue_2,     s:syntax_bg,          '')
  call <sid>X('Title',        s:mono_1,         '',               'none')
  call <sid>X('Visual',       '',              s:visual_grey,    '')
  call <sid>X('VisualNOS',    '',              s:visual_grey,    '')
  call <sid>X('WarningMsg',   s:hue_5,         '',               '')
  call <sid>X('TooLong',      s:hue_5,         '',               '')
  call <sid>X('WildMenu',     s:syntax_fg,     s:mono_3,         '')
  call <sid>X('Normal',       s:syntax_fg,     s:syntax_bg,      '')
  call <sid>X('SignColumn',   '',              s:mono_3,         '')
  call <sid>X('Special',      s:hue_2,         '',               '')
  " }}}

  " Standard syntax highlighting --------------------------------------------{{{
  call <sid>X('Comment',        s:mono_3,        '',          'italic')
  call <sid>X('Constant',       s:hue_4,         '',          '')
  call <sid>X('String',         s:hue_4,         '',          '')
  call <sid>X('Character',      s:hue_4,         '',          '')
  call <sid>X('Number',         s:hue_6,         '',          '')
  call <sid>X('Boolean',        s:hue_6,         '',          '')
  call <sid>X('Float',          s:hue_6,         '',          '')
  call <sid>X('Identifier',     s:hue_5,         '',          'none')
  call <sid>X('Function',       s:hue_2,         '',          '')
  call <sid>X('Statement',      s:hue_3,         '',          'none')
  call <sid>X('Conditional',    s:hue_3,         '',          '')
  call <sid>X('Repeat',         s:hue_3,         '',          '')
  call <sid>X('Label',          s:hue_3,         '',          '')
  call <sid>X('Operator',       s:syntax_accent, '',          'none')
  call <sid>X('Keyword',        s:hue_5,         '',          '')
  call <sid>X('Exception',      s:hue_3,         '',          '')
  call <sid>X('PreProc',        s:hue_6_2,       '',          '')
  call <sid>X('Include',        s:hue_2,         '',          '')
  call <sid>X('Define',         s:hue_3,         '',          'none')
  call <sid>X('Macro',          s:hue_3,         '',          '')
  call <sid>X('PreCondit',      s:hue_6_2,       '',          '')
  call <sid>X('Type',           s:hue_6_2,       '',          'none')
  call <sid>X('StorageClass',   s:hue_6_2,       '',          '')
  call <sid>X('Structure',      s:hue_6_2,       '',          '')
  call <sid>X('Typedef',        s:hue_6_2,       '',          '')
  call <sid>X('Special',        s:hue_2,         '',          '')
  call <sid>X('SpecialChar',    '',              '',          '')
  call <sid>X('Tag',            '',              '',          '')
  call <sid>X('Delimiter',      '',              '',          '')
  call <sid>X('SpecialComment', '',              '',          '')
  call <sid>X('Debug',          '',              '',          '')
  call <sid>X('Underlined',     '',              '',          '')
  call <sid>X('Ignore',         '',              '',          '')
  call <sid>X('Error',          s:hue_5,         s:syntax_bg, 'bold')
  call <sid>X('Todo',           s:hue_3,         s:syntax_bg, '')
  " }}}

  " Diff highlighting -------------------------------------------------------{{{
  call <sid>X('DiffAdd',     s:syntax_bg, s:hue_4, '')
  call <sid>X('DiffChange',  '', s:syntax_cursor, '')
  call <sid>X('DiffDelete',  s:hue_5, s:hue_5, '')
  call <sid>X('DiffText',    '', s:visual_grey, '')
  call <sid>X('DiffAdded',   s:hue_4, s:visual_grey, '')
  call <sid>X('DiffFile',    s:hue_5, s:visual_grey, '')
  call <sid>X('DiffNewFile', s:hue_4, s:visual_grey, '')
  call <sid>X('DiffLine',    s:hue_2, s:visual_grey, '')
  call <sid>X('DiffRemoved', s:hue_5, s:visual_grey, '')
  " }}}

  " Asciidoc highlighting ---------------------------------------------------{{{
  call <sid>X('asciidocListingBlock',   s:mono_2,  '', '')
  " }}}

  " Cucumber highlighting ---------------------------------------------------{{{
  call <sid>X('cucumberGiven',           s:hue_2,  '', '')
  call <sid>X('cucumberWhen',            s:hue_2,  '', '')
  call <sid>X('cucumberWhenAnd',         s:hue_2,  '', '')
  call <sid>X('cucumberThen',            s:hue_2,  '', '')
  call <sid>X('cucumberThenAnd',         s:hue_2,  '', '')
  call <sid>X('cucumberUnparsed',        s:hue_6,  '', '')
  call <sid>X('cucumberFeature',         s:hue_5,  '', 'bold')
  call <sid>X('cucumberBackground',      s:hue_3,  '', 'bold')
  call <sid>X('cucumberScenario',        s:hue_3,  '', 'bold')
  call <sid>X('cucumberScenarioOutline', s:hue_3,  '', 'bold')
  call <sid>X('cucumberTags',            s:mono_3, '', 'bold')
  call <sid>X('cucumberDelimiter',       s:mono_3, '', 'bold')
  " }}}

  " CSS/Sass highlighting ---------------------------------------------------{{{
  call <sid>X('cssAttrComma',         s:hue_3,  '', '')
  call <sid>X('cssAttributeSelector', s:hue_4,  '', '')
  call <sid>X('cssBraces',            s:mono_3, '', '')
  call <sid>X('cssClassName',         s:hue_6,  '', '')
  call <sid>X('cssClassNameDot',      s:hue_6,  '', '')
  call <sid>X('cssDefinition',        s:hue_3,  '', '')
  call <sid>X('cssFontAttr',          s:hue_6,  '', '')
  call <sid>X('cssFontDescriptor',    s:hue_3,  '', '')
  call <sid>X('cssFunctionName',      s:hue_2,  '', '')
  call <sid>X('cssIdentifier',        s:hue_2,  '', '')
  call <sid>X('cssImportant',         s:hue_3,  '', '')
  call <sid>X('cssInclude',           s:mono_1, '', '')
  call <sid>X('cssIncludeKeyword',    s:hue_3,  '', '')
  call <sid>X('cssMediaType',         s:hue_6,  '', '')
  call <sid>X('cssProp',              s:hue_1,  '', '')
  call <sid>X('cssPseudoClassId',     s:hue_6,  '', '')
  call <sid>X('cssSelectorOp',        s:hue_3,  '', '')
  call <sid>X('cssSelectorOp2',       s:hue_3,  '', '')
  call <sid>X('cssStringQ',           s:mono_1, '', '')
  call <sid>X('cssStringQQ',          s:mono_1, '', '')
  call <sid>X('cssTagName',           s:hue_5,  '', '')
  call <sid>X('cssAttr',              s:hue_6,  '', '')

  call <sid>X('sassAmpersand',      s:hue_5,   '', '')
  call <sid>X('sassClass',          s:hue_6_2, '', '')
  call <sid>X('sassControl',        s:hue_3,   '', '')
  call <sid>X('sassExtend',         s:hue_3,   '', '')
  call <sid>X('sassFor',            s:mono_1,  '', '')
  call <sid>X('sassProperty',       s:hue_1,   '', '')
  call <sid>X('sassFunction',       s:hue_1,   '', '')
  call <sid>X('sassId',             s:hue_2,   '', '')
  call <sid>X('sassInclude',        s:hue_3,   '', '')
  call <sid>X('sassMedia',          s:hue_3,   '', '')
  call <sid>X('sassMediaOperators', s:mono_1,  '', '')
  call <sid>X('sassMixin',          s:hue_3,   '', '')
  call <sid>X('sassMixinName',      s:hue_2,   '', '')
  call <sid>X('sassMixing',         s:hue_3,   '', '')
  " }}}

  " Elixir highlighting------------------------------------------------------{{{
  call <sid>X('elixirAlias',             s:hue_6_2, '', '')
  call <sid>X('elixirAtom',              s:hue_1,   '', '')
  call <sid>X('elixirBlockDefinition',   s:hue_3,   '', '')
  call <sid>X('elixirModuleDeclaration', s:hue_6,   '', '')
  " }}}

  " Git and git related plugins highlighting --------------------------------{{{
  call <sid>X('gitcommitComment',       s:mono_3,  '', '')
  call <sid>X('gitcommitUnmerged',      s:hue_4,   '', '')
  call <sid>X('gitcommitOnBranch',      '',        '', '')
  call <sid>X('gitcommitBranch',        s:hue_3,   '', '')
  call <sid>X('gitcommitDiscardedType', s:hue_5,   '', '')
  call <sid>X('gitcommitSelectedType',  s:hue_4,   '', '')
  call <sid>X('gitcommitHeader',        '',        '', '')
  call <sid>X('gitcommitUntrackedFile', s:hue_1,   '', '')
  call <sid>X('gitcommitDiscardedFile', s:hue_5,   '', '')
  call <sid>X('gitcommitSelectedFile',  s:hue_4,   '', '')
  call <sid>X('gitcommitUnmergedFile',  s:hue_6_2, '', '')
  call <sid>X('gitcommitFile',          '',        '', '')
  hi link gitcommitNoBranch       gitcommitBranch
  hi link gitcommitUntracked      gitcommitComment
  hi link gitcommitDiscarded      gitcommitComment
  hi link gitcommitSelected       gitcommitComment
  hi link gitcommitDiscardedArrow gitcommitDiscardedFile
  hi link gitcommitSelectedArrow  gitcommitSelectedFile
  hi link gitcommitUnmergedArrow  gitcommitUnmergedFile

  call <sid>X('SignifySignAdd',    s:hue_4,   '', '')
  call <sid>X('SignifySignChange', s:hue_6_2, '', '')
  call <sid>X('SignifySignDelete', s:hue_5,   '', '')
  hi link GitGutterAdd    SignifySignAdd
  hi link GitGutterChange SignifySignChange
  hi link GitGutterDelete SignifySignDelete
  call <sid>X('diffAdded',         s:hue_4,   '', '')
  call <sid>X('diffRemoved',       s:hue_5,   '', '')
  " }}}

  " Go highlighting ---------------------------------------------------------{{{
  call <sid>X('goDeclaration',         s:hue_3, '', '')
  call <sid>X('goField',               s:hue_5, '', '')
  call <sid>X('goMethod',              s:hue_1, '', '')
  call <sid>X('goType',                s:hue_3, '', '')
  call <sid>X('goUnsignedInts',        s:hue_1, '', '')
  " }}}

  " HTML highlighting -------------------------------------------------------{{{
  call <sid>X('htmlArg',            s:hue_6,  '', '')
  call <sid>X('htmlTagName',        s:hue_5,  '', '')
  call <sid>X('htmlSpecialTagName', s:hue_5,  '', '')
  call <sid>X('htmlTag',            s:mono_3, '', '')
  " }}}

  " JavaScript highlighting -------------------------------------------------{{{
  call <sid>X('coffeeString',           s:hue_4,   '', '')

  call <sid>X('javaScriptBraces',       s:mono_3,  '', '')
  call <sid>X('javaScriptFunction',     s:hue_3,   '', '')
  call <sid>X('javaScriptIdentifier',   s:hue_3,   '', '')
  call <sid>X('javaScriptNull',         s:hue_6,   '', '')
  call <sid>X('javaScriptNumber',       s:hue_6,   '', '')
  call <sid>X('javaScriptRequire',      s:hue_1,   '', '')
  call <sid>X('javaScriptReserved',     s:hue_3,   '', '')
  " https://github.com/pangloss/vim-javascript
  call <sid>X('jsArrowFunction',        s:hue_3,   '', '')
  call <sid>X('jsClassKeywords',        s:hue_3,   '', '')
  call <sid>X('jsDocParam',             s:hue_2,   '', '')
  call <sid>X('jsDocTags',              s:hue_3,   '', '')
  call <sid>X('jsFuncCall',             s:hue_2,   '', '')
  call <sid>X('jsFunction',             s:hue_3,   '', '')
  call <sid>X('jsGlobalObjects',        s:hue_6_2, '', '')
  call <sid>X('jsModuleWords',          s:hue_3,   '', '')
  call <sid>X('jsModules',              s:hue_3,   '', '')
  call <sid>X('jsNull',                 s:hue_6,   '', '')
  call <sid>X('jsOperator',             s:hue_3,   '', '')
  call <sid>X('jsStorageClass',         s:hue_3,   '', '')
  call <sid>X('jsTemplateBraces',       s:hue_5_2, '', '')
  call <sid>X('jsTemplateVar',          s:hue_4,   '', '')
  call <sid>X('jsThis',                 s:hue_5,   '', '')
  call <sid>X('jsUndefined',            s:hue_6,   '', '')
  " https://github.com/othree/yajs.vim
  call <sid>X('javascriptArrowFunc',    s:hue_3,   '', '')
  call <sid>X('javascriptClassExtends', s:hue_3,   '', '')
  call <sid>X('javascriptClassKeyword', s:hue_3,   '', '')
  call <sid>X('javascriptDocNotation',  s:hue_3,   '', '')
  call <sid>X('javascriptDocParamName', s:hue_2,   '', '')
  call <sid>X('javascriptDocTags',      s:hue_3,   '', '')
  call <sid>X('javascriptEndColons',    s:mono_3,  '', '')
  call <sid>X('javascriptExport',       s:hue_3,   '', '')
  call <sid>X('javascriptFuncArg',      s:mono_1,  '', '')
  call <sid>X('javascriptFuncKeyword',  s:hue_3,   '', '')
  call <sid>X('javascriptIdentifier',   s:hue_5,   '', '')
  call <sid>X('javascriptImport',       s:hue_3,   '', '')
  call <sid>X('javascriptObjectLabel',  s:mono_1,  '', '')
  call <sid>X('javascriptOpSymbol',     s:hue_1,   '', '')
  call <sid>X('javascriptOpSymbols',    s:hue_1,   '', '')
  call <sid>X('javascriptPropertyName', s:hue_4,   '', '')
  call <sid>X('javascriptTemplateSB',   s:hue_5_2, '', '')
  call <sid>X('javascriptVariable',     s:hue_3,   '', '')
  " }}}

  " JSON highlighting -------------------------------------------------------{{{
  call <sid>X('jsonCommentError',      s:mono_1, '', ''        )
  call <sid>X('jsonKeyword',           s:hue_5,  '', ''        )
  call <sid>X('jsonQuote',             s:mono_3, '', ''        )
  call <sid>X('jsonMissingCommaError', s:hue_5,  '', 'reverse' )
  call <sid>X('jsonNoQuotesError',     s:hue_5,  '', 'reverse' )
  call <sid>X('jsonNumError',          s:hue_5,  '', 'reverse' )
  call <sid>X('jsonString',            s:hue_4,  '', ''        )
  call <sid>X('jsonStringSQError',     s:hue_5,  '', 'reverse' )
  call <sid>X('jsonSemicolonError',    s:hue_5,  '', 'reverse' )
  " }}}

  " Markdown highlighting ---------------------------------------------------{{{
  call <sid>X('markdownUrl',              s:mono_3,  '', '')
  call <sid>X('markdownBold',             s:hue_6,   '', 'bold')
  call <sid>X('markdownItalic',           s:hue_6,   '', 'bold')
  call <sid>X('markdownCode',             s:hue_4,   '', '')
  call <sid>X('markdownCodeBlock',        s:hue_5,   '', '')
  call <sid>X('markdownCodeDelimiter',    s:hue_4,   '', '')
  call <sid>X('markdownHeadingDelimiter', s:hue_5_2, '', '')
  call <sid>X('markdownH1',               s:hue_5,   '', '')
  call <sid>X('markdownH2',               s:hue_5,   '', '')
  call <sid>X('markdownH3',               s:hue_5,   '', '')
  call <sid>X('markdownH3',               s:hue_5,   '', '')
  call <sid>X('markdownH4',               s:hue_5,   '', '')
  call <sid>X('markdownH5',               s:hue_5,   '', '')
  call <sid>X('markdownH6',               s:hue_5,   '', '')
  call <sid>X('markdownListMarker',       s:hue_5,   '', '')
  " }}}

  " PHP highlighting --------------------------------------------------------{{{
  call <sid>X('phpClass',        s:hue_6_2, '', '')
  call <sid>X('phpFunction',     s:hue_2,   '', '')
  call <sid>X('phpFunctions',    s:hue_2,   '', '')
  call <sid>X('phpInclude',      s:hue_3,   '', '')
  call <sid>X('phpKeyword',      s:hue_3,   '', '')
  call <sid>X('phpParent',       s:mono_3,  '', '')
  call <sid>X('phpType',         s:hue_3,   '', '')
  call <sid>X('phpSuperGlobals', s:hue_5,   '', '')
  " }}}

  " Pug (Formerly Jade) highlighting ----------------------------------------{{{
  call <sid>X('pugAttributesDelimiter',   s:hue_6,    '', '')
  call <sid>X('pugClass',                 s:hue_6,    '', '')
  call <sid>X('pugDocType',               s:mono_3,   '', 'italic')
  call <sid>X('pugTag',                   s:hue_5,    '', '')
  " }}}

  " Ruby highlighting -------------------------------------------------------{{{
  call <sid>X('rubyBlock',                     s:hue_3,   '', '')
  call <sid>X('rubyBlockParameter',            s:hue_5,   '', '')
  call <sid>X('rubyBlockParameterList',        s:hue_5,   '', '')
  call <sid>X('rubyCapitalizedMethod',         s:hue_3,   '', '')
  call <sid>X('rubyClass',                     s:hue_3,   '', '')
  call <sid>X('rubyConstant',                  s:hue_6_2, '', '')
  call <sid>X('rubyControl',                   s:hue_3,   '', '')
  call <sid>X('rubyDefine',                    s:hue_3,   '', '')
  call <sid>X('rubyEscape',                    s:hue_5,   '', '')
  call <sid>X('rubyFunction',                  s:hue_2,   '', '')
  call <sid>X('rubyGlobalVariable',            s:hue_5,   '', '')
  call <sid>X('rubyInclude',                   s:hue_2,   '', '')
  call <sid>X('rubyIncluderubyGlobalVariable', s:hue_5,   '', '')
  call <sid>X('rubyInstanceVariable',          s:hue_5,   '', '')
  call <sid>X('rubyInterpolation',             s:hue_1,   '', '')
  call <sid>X('rubyInterpolationDelimiter',    s:hue_5,   '', '')
  call <sid>X('rubyKeyword',                   s:hue_2,   '', '')
  call <sid>X('rubyModule',                    s:hue_3,   '', '')
  call <sid>X('rubyPseudoVariable',            s:hue_5,   '', '')
  call <sid>X('rubyRegexp',                    s:hue_1,   '', '')
  call <sid>X('rubyRegexpDelimiter',           s:hue_1,   '', '')
  call <sid>X('rubyStringDelimiter',           s:hue_4,   '', '')
  call <sid>X('rubySymbol',                    s:hue_1,   '', '')
  " }}}

  " Spelling highlighting ---------------------------------------------------{{{
  call <sid>X('SpellBad',     '', s:syntax_bg, 'undercurl', s:hue_5)
  call <sid>X('SpellLocal',   '', s:syntax_bg, 'undercurl')
  call <sid>X('SpellCap',     '', s:syntax_bg, 'undercurl', s:hue_6)
  call <sid>X('SpellRare',    '', s:syntax_bg, 'undercurl')
  " }}}

  " Vim highlighting --------------------------------------------------------{{{
  call <sid>X('vimCommand',      s:hue_2,  '', '')
  call <sid>X('vimCommentTitle', s:mono_3, '', 'bold')
  call <sid>X('vimFunction',     s:hue_1,  '', '')
  call <sid>X('vimFuncName',     s:hue_3,  '', '')
  call <sid>X('vimHighlight',    s:hue_2,  '', '')
  call <sid>X('vimLineComment',  s:mono_3, '', 'italic')
  call <sid>X('vimParenSep',     s:mono_3, '', '')
  call <sid>X('vimSep',          s:mono_3, '', '')
  call <sid>X('vimUserFunc',     s:hue_1,  '', '')
  call <sid>X('vimVar',          s:hue_5,  '', '')
  " }}}

  " XML highlighting --------------------------------------------------------{{{
  call <sid>X('xmlAttrib',  s:hue_6_2, '', '')
  call <sid>X('xmlEndTag',  s:hue_5,   '', '')
  call <sid>X('xmlTag',     s:hue_5,   '', '')
  call <sid>X('xmlTagName', s:hue_5,   '', '')
  " }}}

  " ZSH highlighting --------------------------------------------------------{{{
  call <sid>X('zshCommands',     s:syntax_fg, '', '')
  call <sid>X('zshDeref',        s:hue_5,     '', '')
  call <sid>X('zshShortDeref',   s:hue_5,     '', '')
  call <sid>X('zshFunction',     s:hue_1,     '', '')
  call <sid>X('zshKeyword',      s:hue_3,     '', '')
  call <sid>X('zshSubst',        s:hue_5,     '', '')
  call <sid>X('zshSubstDelim',   s:mono_3,    '', '')
  call <sid>X('zshTypes',        s:hue_3,     '', '')
  call <sid>X('zshVariableDef',  s:hue_6,     '', '')
  " }}}

endif
"}}}

" Delete functions =========================================================={{{
delf <SID>X
delf <SID>rgb
delf <SID>color
delf <SID>rgb_color
delf <SID>rgb_level
delf <SID>rgb_number
delf <SID>grey_color
delf <SID>grey_level
delf <SID>grey_number
"}}}

" vim: set fdl=0 fdm=marker:
<commit_msg>Don't step on vim-one's italics.<commit_after>" Name:    one vim colorscheme (duplicated inside VimBox, just so plugin
" instal looks nice).
" Author:  <NAME>
" License: MIT
" Version: 1.1.1-pre

" Global setup =============================================================={{{

hi clear
syntax reset
if exists('g:colors_name')
  unlet g:colors_name
endif
let g:colors_name = 'vimBoxColorsDuringLoad'

if !exists('g:vimBoxColorsDuringLoad_allow_italics')
  let g:vimBoxColorsDuringLoad_allow_italics = 0
endif

let g:hasGuiRunning = has('gui_running')

if has('gui_running') || &t_Co == 88 || &t_Co == 256
  " functions
  " returns an approximate grey index for the given grey level

  " Utility functions -------------------------------------------------------{{{
  fun <SID>grey_number(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
  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_color(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 color index for the given color 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 color level for the given color 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 color indices
  fun <SID>rgb_color(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 color levels
  fun <SID>color(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 color
    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_color(l:gx)
      else
        " use the color
        return <SID>rgb_color(l:x, l:y, l:z)
      endif
    else
      " only one possibility
      return <SID>rgb_color(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>color(l:r, l:g, l:b)
  endfun

  " sets the highlighting for the given group
  fun <sid>X(...)
    let l:groupArg = a:1
    let l:fgArg = a:2
    let l:bgArg = a:3
    let l:attrArg = a:4
    if g:vimBoxColorsDuringLoad_allow_italics == 0 && l:attrArg ==? 'italic'
        let l:attrArg= 'none'
    endif

    let l:bg = ""
    let l:fg = ""
    let l:guisp = ""
    let l:decoration = ""

    if l:bgArg != ''
      let l:bg = " guibg=#" . l:bgArg . " ctermbg=" . <SID>rgb(l:bgArg)
    endif

    if l:fgArg != ''
      let l:fg = " guifg=#" . l:fgArg . " ctermfg=" . <SID>rgb(l:fgArg)
    endif

    if l:attrArg != ''
      let l:decoration = " gui=" . l:attrArg . " cterm=" . l:attrArg
    endif

    if g:hasGuiRunning && a:0 >= 5 && a:5 != ''
      let l:guispArg = a:5
      let l:guisp = " guisp=#" . l:guispArg
    endif

    let l:exec = l:fg . l:bg . l:decoration . l:guisp

    if l:exec != ''
      exec "hi " . l:groupArg . l:exec
    endif
  endfun

  "}}}

  " Color definition --------------------------------------------------------{{{
  if &background ==# 'dark'
    let s:mono_1 = 'abb2bf'
    let s:mono_2 = '828997'
    let s:mono_3 = '5c6370'


    let s:hue_1  = '56b6c2' " cyan
    let s:hue_2  = '61afef' " blue
    let s:hue_3  = 'c678dd' " purple
    let s:hue_4  = '98c379' " green

    let s:hue_5   = 'e06c75' " red 1
    let s:hue_5_2 = 'be5046' " red 2

    let s:hue_6   = 'd19a66' " orange 1
    let s:hue_6_2 = 'e5c07b' " orange 2

    let s:syntax_bg     = '282c34'
    let s:syntax_gutter = '636d83'
    let s:syntax_cursor = '2e343e'

    let s:syntax_accent = '528bff'

    let s:vertsplit    = '22262d'
    let s:special_grey = '3b4048'
    " jordwalke: A bit less contrast.
    let s:visual_grey  = '3b414f'
  else
    let s:mono_1 = '494b53'
    let s:mono_2 = '696c77'
    let s:mono_3 = 'a0a1a7'

    let s:hue_1  = '0184bc' " cyan
    let s:hue_1  = '0083be' " cyan
    let s:hue_2  = '4078f2' " blue
    let s:hue_3  = 'a626a4' " purple
    let s:hue_4  = '50a14f' " green

    let s:hue_5   = 'e45649' " red 1
    let s:hue_5_2 = 'ca1243' " red 2

    let s:hue_6   = '986801' " orange 1
    let s:hue_6_2 = 'c18401' " orange 2

    let s:syntax_bg     = 'fafafa'
    let s:syntax_gutter = '9e9e9e'
    let s:syntax_cursor = 'eeeeee'

    let s:syntax_accent = '526fff'
    let s:syntax_accent_2 = '0083be'

    let s:vertsplit    = 'e7e9e1'
    let s:special_grey = 'd3d3d3'
    let s:visual_grey  = 'd0d0d0'
  endif

  let s:syntax_fg = s:mono_1
  let s:syntax_fold_bg = s:mono_3

  "}}}

  " Vim editor color --------------------------------------------------------{{{
  call <sid>X('bold',         '',              '',               'bold')
  call <sid>X('ColorColumn',  '',              s:syntax_cursor,  '')
  call <sid>X('Conceal',      '',              '',               '')
  call <sid>X('Cursor',       s:syntax_bg,     s:hue_2,          '')
  call <sid>X('CursorIM',     '',              '',               '')
  call <sid>X('CursorColumn', '',              s:syntax_cursor,  '')
  call <sid>X('CursorLine',   '',              s:syntax_cursor,  '')
  call <sid>X('Directory',    s:hue_2,         '',               '')
  call <sid>X('ErrorMsg',     s:hue_5,         s:syntax_bg,      'none')
  call <sid>X('VertSplit',    s:vertsplit,     '',               'none')
  call <sid>X('Folded',       s:syntax_bg,     s:syntax_fold_bg, 'none')
  call <sid>X('FoldColumn',   s:mono_3,        s:syntax_cursor,  '')
  call <sid>X('IncSearch',    s:syntax_bg,     s:hue_6_2,        'none')
  call <sid>X('LineNr',       s:syntax_gutter, '',               '')
  call <sid>X('CursorLineNr', s:syntax_fg,     '',               'none')
  call <sid>X('MatchParen',   s:syntax_bg,     s:hue_5,          '')
  call <sid>X('Italic',       '',              '',               'italic')
  call <sid>X('ModeMsg',      s:syntax_fg,     '',               '')
  call <sid>X('MoreMsg',      s:syntax_fg,     '',               '')
  " jordwalke: Hide NonText clutter.
  call <sid>X('NonText',      s:syntax_bg,     s:syntax_bg,      '')
  call <sid>X('PMenu',        '',              s:visual_grey,    '')
  " jordwalke: make the popup stand out just a bit.
  call <sid>X('PMenuSel',     s:syntax_bg,              s:hue_2,  '')
  " jordwalke: Avoid floating scrollbar thumb.
  call <sid>X('PMenuSbar',    '',              s:visual_grey,      '')
  call <sid>X('PMenuThumb',   '',              s:mono_1,         '')
  call <sid>X('Question',     s:hue_2,         '',               '')
  call <sid>X('Search',       s:syntax_bg,     s:hue_6_2,        '')
  call <sid>X('SpecialKey',   s:special_grey,  '',               '')
  call <sid>X('StatusLine',   s:syntax_fg,     s:syntax_cursor,  'none')
  " Remove the ugly grey nub.
  call <sid>X('StatusLineNC', s:syntax_cursor, s:mono_2,               '')
  call <sid>X('TabLine',      s:mono_1,        s:syntax_cursor,      'none')
  call <sid>X('TabLineFill',  s:mono_3,        s:syntax_cursor,  'none')
  call <sid>X('TabLineSel',   s:hue_2,     s:syntax_bg,          '')
  call <sid>X('Title',        s:mono_1,         '',               'none')
  call <sid>X('Visual',       '',              s:visual_grey,    '')
  call <sid>X('VisualNOS',    '',              s:visual_grey,    '')
  call <sid>X('WarningMsg',   s:hue_5,         '',               '')
  call <sid>X('TooLong',      s:hue_5,         '',               '')
  call <sid>X('WildMenu',     s:syntax_fg,     s:mono_3,         '')
  call <sid>X('Normal',       s:syntax_fg,     s:syntax_bg,      '')
  call <sid>X('SignColumn',   '',              s:mono_3,         '')
  call <sid>X('Special',      s:hue_2,         '',               '')
  " }}}

  " Standard syntax highlighting --------------------------------------------{{{
  call <sid>X('Comment',        s:mono_3,        '',          'italic')
  call <sid>X('Constant',       s:hue_4,         '',          '')
  call <sid>X('String',         s:hue_4,         '',          '')
  call <sid>X('Character',      s:hue_4,         '',          '')
  call <sid>X('Number',         s:hue_6,         '',          '')
  call <sid>X('Boolean',        s:hue_6,         '',          '')
  call <sid>X('Float',          s:hue_6,         '',          '')
  call <sid>X('Identifier',     s:hue_5,         '',          'none')
  call <sid>X('Function',       s:hue_2,         '',          '')
  call <sid>X('Statement',      s:hue_3,         '',          'none')
  call <sid>X('Conditional',    s:hue_3,         '',          '')
  call <sid>X('Repeat',         s:hue_3,         '',          '')
  call <sid>X('Label',          s:hue_3,         '',          '')
  call <sid>X('Operator',       s:syntax_accent, '',          'none')
  call <sid>X('Keyword',        s:hue_5,         '',          '')
  call <sid>X('Exception',      s:hue_3,         '',          '')
  call <sid>X('PreProc',        s:hue_6_2,       '',          '')
  call <sid>X('Include',        s:hue_2,         '',          '')
  call <sid>X('Define',         s:hue_3,         '',          'none')
  call <sid>X('Macro',          s:hue_3,         '',          '')
  call <sid>X('PreCondit',      s:hue_6_2,       '',          '')
  call <sid>X('Type',           s:hue_6_2,       '',          'none')
  call <sid>X('StorageClass',   s:hue_6_2,       '',          '')
  call <sid>X('Structure',      s:hue_6_2,       '',          '')
  call <sid>X('Typedef',        s:hue_6_2,       '',          '')
  call <sid>X('Special',        s:hue_2,         '',          '')
  call <sid>X('SpecialChar',    '',              '',          '')
  call <sid>X('Tag',            '',              '',          '')
  call <sid>X('Delimiter',      '',              '',          '')
  call <sid>X('SpecialComment', '',              '',          '')
  call <sid>X('Debug',          '',              '',          '')
  call <sid>X('Underlined',     '',              '',          '')
  call <sid>X('Ignore',         '',              '',          '')
  call <sid>X('Error',          s:hue_5,         s:syntax_bg, 'bold')
  call <sid>X('Todo',           s:hue_3,         s:syntax_bg, '')
  " }}}

  " Diff highlighting -------------------------------------------------------{{{
  call <sid>X('DiffAdd',     s:syntax_bg, s:hue_4, '')
  call <sid>X('DiffChange',  '', s:syntax_cursor, '')
  call <sid>X('DiffDelete',  s:hue_5, s:hue_5, '')
  call <sid>X('DiffText',    '', s:visual_grey, '')
  call <sid>X('DiffAdded',   s:hue_4, s:visual_grey, '')
  call <sid>X('DiffFile',    s:hue_5, s:visual_grey, '')
  call <sid>X('DiffNewFile', s:hue_4, s:visual_grey, '')
  call <sid>X('DiffLine',    s:hue_2, s:visual_grey, '')
  call <sid>X('DiffRemoved', s:hue_5, s:visual_grey, '')
  " }}}

  " Asciidoc highlighting ---------------------------------------------------{{{
  call <sid>X('asciidocListingBlock',   s:mono_2,  '', '')
  " }}}

  " Cucumber highlighting ---------------------------------------------------{{{
  call <sid>X('cucumberGiven',           s:hue_2,  '', '')
  call <sid>X('cucumberWhen',            s:hue_2,  '', '')
  call <sid>X('cucumberWhenAnd',         s:hue_2,  '', '')
  call <sid>X('cucumberThen',            s:hue_2,  '', '')
  call <sid>X('cucumberThenAnd',         s:hue_2,  '', '')
  call <sid>X('cucumberUnparsed',        s:hue_6,  '', '')
  call <sid>X('cucumberFeature',         s:hue_5,  '', 'bold')
  call <sid>X('cucumberBackground',      s:hue_3,  '', 'bold')
  call <sid>X('cucumberScenario',        s:hue_3,  '', 'bold')
  call <sid>X('cucumberScenarioOutline', s:hue_3,  '', 'bold')
  call <sid>X('cucumberTags',            s:mono_3, '', 'bold')
  call <sid>X('cucumberDelimiter',       s:mono_3, '', 'bold')
  " }}}

  " CSS/Sass highlighting ---------------------------------------------------{{{
  call <sid>X('cssAttrComma',         s:hue_3,  '', '')
  call <sid>X('cssAttributeSelector', s:hue_4,  '', '')
  call <sid>X('cssBraces',            s:mono_3, '', '')
  call <sid>X('cssClassName',         s:hue_6,  '', '')
  call <sid>X('cssClassNameDot',      s:hue_6,  '', '')
  call <sid>X('cssDefinition',        s:hue_3,  '', '')
  call <sid>X('cssFontAttr',          s:hue_6,  '', '')
  call <sid>X('cssFontDescriptor',    s:hue_3,  '', '')
  call <sid>X('cssFunctionName',      s:hue_2,  '', '')
  call <sid>X('cssIdentifier',        s:hue_2,  '', '')
  call <sid>X('cssImportant',         s:hue_3,  '', '')
  call <sid>X('cssInclude',           s:mono_1, '', '')
  call <sid>X('cssIncludeKeyword',    s:hue_3,  '', '')
  call <sid>X('cssMediaType',         s:hue_6,  '', '')
  call <sid>X('cssProp',              s:hue_1,  '', '')
  call <sid>X('cssPseudoClassId',     s:hue_6,  '', '')
  call <sid>X('cssSelectorOp',        s:hue_3,  '', '')
  call <sid>X('cssSelectorOp2',       s:hue_3,  '', '')
  call <sid>X('cssStringQ',           s:mono_1, '', '')
  call <sid>X('cssStringQQ',          s:mono_1, '', '')
  call <sid>X('cssTagName',           s:hue_5,  '', '')
  call <sid>X('cssAttr',              s:hue_6,  '', '')

  call <sid>X('sassAmpersand',      s:hue_5,   '', '')
  call <sid>X('sassClass',          s:hue_6_2, '', '')
  call <sid>X('sassControl',        s:hue_3,   '', '')
  call <sid>X('sassExtend',         s:hue_3,   '', '')
  call <sid>X('sassFor',            s:mono_1,  '', '')
  call <sid>X('sassProperty',       s:hue_1,   '', '')
  call <sid>X('sassFunction',       s:hue_1,   '', '')
  call <sid>X('sassId',             s:hue_2,   '', '')
  call <sid>X('sassInclude',        s:hue_3,   '', '')
  call <sid>X('sassMedia',          s:hue_3,   '', '')
  call <sid>X('sassMediaOperators', s:mono_1,  '', '')
  call <sid>X('sassMixin',          s:hue_3,   '', '')
  call <sid>X('sassMixinName',      s:hue_2,   '', '')
  call <sid>X('sassMixing',         s:hue_3,   '', '')
  " }}}

  " Elixir highlighting------------------------------------------------------{{{
  call <sid>X('elixirAlias',             s:hue_6_2, '', '')
  call <sid>X('elixirAtom',              s:hue_1,   '', '')
  call <sid>X('elixirBlockDefinition',   s:hue_3,   '', '')
  call <sid>X('elixirModuleDeclaration', s:hue_6,   '', '')
  " }}}

  " Git and git related plugins highlighting --------------------------------{{{
  call <sid>X('gitcommitComment',       s:mono_3,  '', '')
  call <sid>X('gitcommitUnmerged',      s:hue_4,   '', '')
  call <sid>X('gitcommitOnBranch',      '',        '', '')
  call <sid>X('gitcommitBranch',        s:hue_3,   '', '')
  call <sid>X('gitcommitDiscardedType', s:hue_5,   '', '')
  call <sid>X('gitcommitSelectedType',  s:hue_4,   '', '')
  call <sid>X('gitcommitHeader',        '',        '', '')
  call <sid>X('gitcommitUntrackedFile', s:hue_1,   '', '')
  call <sid>X('gitcommitDiscardedFile', s:hue_5,   '', '')
  call <sid>X('gitcommitSelectedFile',  s:hue_4,   '', '')
  call <sid>X('gitcommitUnmergedFile',  s:hue_6_2, '', '')
  call <sid>X('gitcommitFile',          '',        '', '')
  hi link gitcommitNoBranch       gitcommitBranch
  hi link gitcommitUntracked      gitcommitComment
  hi link gitcommitDiscarded      gitcommitComment
  hi link gitcommitSelected       gitcommitComment
  hi link gitcommitDiscardedArrow gitcommitDiscardedFile
  hi link gitcommitSelectedArrow  gitcommitSelectedFile
  hi link gitcommitUnmergedArrow  gitcommitUnmergedFile

  call <sid>X('SignifySignAdd',    s:hue_4,   '', '')
  call <sid>X('SignifySignChange', s:hue_6_2, '', '')
  call <sid>X('SignifySignDelete', s:hue_5,   '', '')
  hi link GitGutterAdd    SignifySignAdd
  hi link GitGutterChange SignifySignChange
  hi link GitGutterDelete SignifySignDelete
  call <sid>X('diffAdded',         s:hue_4,   '', '')
  call <sid>X('diffRemoved',       s:hue_5,   '', '')
  " }}}

  " Go highlighting ---------------------------------------------------------{{{
  call <sid>X('goDeclaration',         s:hue_3, '', '')
  call <sid>X('goField',               s:hue_5, '', '')
  call <sid>X('goMethod',              s:hue_1, '', '')
  call <sid>X('goType',                s:hue_3, '', '')
  call <sid>X('goUnsignedInts',        s:hue_1, '', '')
  " }}}

  " HTML highlighting -------------------------------------------------------{{{
  call <sid>X('htmlArg',            s:hue_6,  '', '')
  call <sid>X('htmlTagName',        s:hue_5,  '', '')
  call <sid>X('htmlSpecialTagName', s:hue_5,  '', '')
  call <sid>X('htmlTag',            s:mono_3, '', '')
  " }}}

  " JavaScript highlighting -------------------------------------------------{{{
  call <sid>X('coffeeString',           s:hue_4,   '', '')

  call <sid>X('javaScriptBraces',       s:mono_3,  '', '')
  call <sid>X('javaScriptFunction',     s:hue_3,   '', '')
  call <sid>X('javaScriptIdentifier',   s:hue_3,   '', '')
  call <sid>X('javaScriptNull',         s:hue_6,   '', '')
  call <sid>X('javaScriptNumber',       s:hue_6,   '', '')
  call <sid>X('javaScriptRequire',      s:hue_1,   '', '')
  call <sid>X('javaScriptReserved',     s:hue_3,   '', '')
  " https://github.com/pangloss/vim-javascript
  call <sid>X('jsArrowFunction',        s:hue_3,   '', '')
  call <sid>X('jsClassKeywords',        s:hue_3,   '', '')
  call <sid>X('jsDocParam',             s:hue_2,   '', '')
  call <sid>X('jsDocTags',              s:hue_3,   '', '')
  call <sid>X('jsFuncCall',             s:hue_2,   '', '')
  call <sid>X('jsFunction',             s:hue_3,   '', '')
  call <sid>X('jsGlobalObjects',        s:hue_6_2, '', '')
  call <sid>X('jsModuleWords',          s:hue_3,   '', '')
  call <sid>X('jsModules',              s:hue_3,   '', '')
  call <sid>X('jsNull',                 s:hue_6,   '', '')
  call <sid>X('jsOperator',             s:hue_3,   '', '')
  call <sid>X('jsStorageClass',         s:hue_3,   '', '')
  call <sid>X('jsTemplateBraces',       s:hue_5_2, '', '')
  call <sid>X('jsTemplateVar',          s:hue_4,   '', '')
  call <sid>X('jsThis',                 s:hue_5,   '', '')
  call <sid>X('jsUndefined',            s:hue_6,   '', '')
  " https://github.com/othree/yajs.vim
  call <sid>X('javascriptArrowFunc',    s:hue_3,   '', '')
  call <sid>X('javascriptClassExtends', s:hue_3,   '', '')
  call <sid>X('javascriptClassKeyword', s:hue_3,   '', '')
  call <sid>X('javascriptDocNotation',  s:hue_3,   '', '')
  call <sid>X('javascriptDocParamName', s:hue_2,   '', '')
  call <sid>X('javascriptDocTags',      s:hue_3,   '', '')
  call <sid>X('javascriptEndColons',    s:mono_3,  '', '')
  call <sid>X('javascriptExport',       s:hue_3,   '', '')
  call <sid>X('javascriptFuncArg',      s:mono_1,  '', '')
  call <sid>X('javascriptFuncKeyword',  s:hue_3,   '', '')
  call <sid>X('javascriptIdentifier',   s:hue_5,   '', '')
  call <sid>X('javascriptImport',       s:hue_3,   '', '')
  call <sid>X('javascriptObjectLabel',  s:mono_1,  '', '')
  call <sid>X('javascriptOpSymbol',     s:hue_1,   '', '')
  call <sid>X('javascriptOpSymbols',    s:hue_1,   '', '')
  call <sid>X('javascriptPropertyName', s:hue_4,   '', '')
  call <sid>X('javascriptTemplateSB',   s:hue_5_2, '', '')
  call <sid>X('javascriptVariable',     s:hue_3,   '', '')
  " }}}

  " JSON highlighting -------------------------------------------------------{{{
  call <sid>X('jsonCommentError',      s:mono_1, '', ''        )
  call <sid>X('jsonKeyword',           s:hue_5,  '', ''        )
  call <sid>X('jsonQuote',             s:mono_3, '', ''        )
  call <sid>X('jsonMissingCommaError', s:hue_5,  '', 'reverse' )
  call <sid>X('jsonNoQuotesError',     s:hue_5,  '', 'reverse' )
  call <sid>X('jsonNumError',          s:hue_5,  '', 'reverse' )
  call <sid>X('jsonString',            s:hue_4,  '', ''        )
  call <sid>X('jsonStringSQError',     s:hue_5,  '', 'reverse' )
  call <sid>X('jsonSemicolonError',    s:hue_5,  '', 'reverse' )
  " }}}

  " Markdown highlighting ---------------------------------------------------{{{
  call <sid>X('markdownUrl',              s:mono_3,  '', '')
  call <sid>X('markdownBold',             s:hue_6,   '', 'bold')
  call <sid>X('markdownItalic',           s:hue_6,   '', 'bold')
  call <sid>X('markdownCode',             s:hue_4,   '', '')
  call <sid>X('markdownCodeBlock',        s:hue_5,   '', '')
  call <sid>X('markdownCodeDelimiter',    s:hue_4,   '', '')
  call <sid>X('markdownHeadingDelimiter', s:hue_5_2, '', '')
  call <sid>X('markdownH1',               s:hue_5,   '', '')
  call <sid>X('markdownH2',               s:hue_5,   '', '')
  call <sid>X('markdownH3',               s:hue_5,   '', '')
  call <sid>X('markdownH3',               s:hue_5,   '', '')
  call <sid>X('markdownH4',               s:hue_5,   '', '')
  call <sid>X('markdownH5',               s:hue_5,   '', '')
  call <sid>X('markdownH6',               s:hue_5,   '', '')
  call <sid>X('markdownListMarker',       s:hue_5,   '', '')
  " }}}

  " PHP highlighting --------------------------------------------------------{{{
  call <sid>X('phpClass',        s:hue_6_2, '', '')
  call <sid>X('phpFunction',     s:hue_2,   '', '')
  call <sid>X('phpFunctions',    s:hue_2,   '', '')
  call <sid>X('phpInclude',      s:hue_3,   '', '')
  call <sid>X('phpKeyword',      s:hue_3,   '', '')
  call <sid>X('phpParent',       s:mono_3,  '', '')
  call <sid>X('phpType',         s:hue_3,   '', '')
  call <sid>X('phpSuperGlobals', s:hue_5,   '', '')
  " }}}

  " Pug (Formerly Jade) highlighting ----------------------------------------{{{
  call <sid>X('pugAttributesDelimiter',   s:hue_6,    '', '')
  call <sid>X('pugClass',                 s:hue_6,    '', '')
  call <sid>X('pugDocType',               s:mono_3,   '', 'italic')
  call <sid>X('pugTag',                   s:hue_5,    '', '')
  " }}}

  " Ruby highlighting -------------------------------------------------------{{{
  call <sid>X('rubyBlock',                     s:hue_3,   '', '')
  call <sid>X('rubyBlockParameter',            s:hue_5,   '', '')
  call <sid>X('rubyBlockParameterList',        s:hue_5,   '', '')
  call <sid>X('rubyCapitalizedMethod',         s:hue_3,   '', '')
  call <sid>X('rubyClass',                     s:hue_3,   '', '')
  call <sid>X('rubyConstant',                  s:hue_6_2, '', '')
  call <sid>X('rubyControl',                   s:hue_3,   '', '')
  call <sid>X('rubyDefine',                    s:hue_3,   '', '')
  call <sid>X('rubyEscape',                    s:hue_5,   '', '')
  call <sid>X('rubyFunction',                  s:hue_2,   '', '')
  call <sid>X('rubyGlobalVariable',            s:hue_5,   '', '')
  call <sid>X('rubyInclude',                   s:hue_2,   '', '')
  call <sid>X('rubyIncluderubyGlobalVariable', s:hue_5,   '', '')
  call <sid>X('rubyInstanceVariable',          s:hue_5,   '', '')
  call <sid>X('rubyInterpolation',             s:hue_1,   '', '')
  call <sid>X('rubyInterpolationDelimiter',    s:hue_5,   '', '')
  call <sid>X('rubyKeyword',                   s:hue_2,   '', '')
  call <sid>X('rubyModule',                    s:hue_3,   '', '')
  call <sid>X('rubyPseudoVariable',            s:hue_5,   '', '')
  call <sid>X('rubyRegexp',                    s:hue_1,   '', '')
  call <sid>X('rubyRegexpDelimiter',           s:hue_1,   '', '')
  call <sid>X('rubyStringDelimiter',           s:hue_4,   '', '')
  call <sid>X('rubySymbol',                    s:hue_1,   '', '')
  " }}}

  " Spelling highlighting ---------------------------------------------------{{{
  call <sid>X('SpellBad',     '', s:syntax_bg, 'undercurl', s:hue_5)
  call <sid>X('SpellLocal',   '', s:syntax_bg, 'undercurl')
  call <sid>X('SpellCap',     '', s:syntax_bg, 'undercurl', s:hue_6)
  call <sid>X('SpellRare',    '', s:syntax_bg, 'undercurl')
  " }}}

  " Vim highlighting --------------------------------------------------------{{{
  call <sid>X('vimCommand',      s:hue_2,  '', '')
  call <sid>X('vimCommentTitle', s:mono_3, '', 'bold')
  call <sid>X('vimFunction',     s:hue_1,  '', '')
  call <sid>X('vimFuncName',     s:hue_3,  '', '')
  call <sid>X('vimHighlight',    s:hue_2,  '', '')
  call <sid>X('vimLineComment',  s:mono_3, '', 'italic')
  call <sid>X('vimParenSep',     s:mono_3, '', '')
  call <sid>X('vimSep',          s:mono_3, '', '')
  call <sid>X('vimUserFunc',     s:hue_1,  '', '')
  call <sid>X('vimVar',          s:hue_5,  '', '')
  " }}}

  " XML highlighting --------------------------------------------------------{{{
  call <sid>X('xmlAttrib',  s:hue_6_2, '', '')
  call <sid>X('xmlEndTag',  s:hue_5,   '', '')
  call <sid>X('xmlTag',     s:hue_5,   '', '')
  call <sid>X('xmlTagName', s:hue_5,   '', '')
  " }}}

  " ZSH highlighting --------------------------------------------------------{{{
  call <sid>X('zshCommands',     s:syntax_fg, '', '')
  call <sid>X('zshDeref',        s:hue_5,     '', '')
  call <sid>X('zshShortDeref',   s:hue_5,     '', '')
  call <sid>X('zshFunction',     s:hue_1,     '', '')
  call <sid>X('zshKeyword',      s:hue_3,     '', '')
  call <sid>X('zshSubst',        s:hue_5,     '', '')
  call <sid>X('zshSubstDelim',   s:mono_3,    '', '')
  call <sid>X('zshTypes',        s:hue_3,     '', '')
  call <sid>X('zshVariableDef',  s:hue_6,     '', '')
  " }}}

endif
"}}}

" Delete functions =========================================================={{{
delf <SID>X
delf <SID>rgb
delf <SID>color
delf <SID>rgb_color
delf <SID>rgb_level
delf <SID>rgb_number
delf <SID>grey_color
delf <SID>grey_level
delf <SID>grey_number
"}}}

" vim: set fdl=0 fdm=marker:

{'fraction_non_alphanumeric': 0.2286860225740044, 'fraction_numerical': 0.023745297082416413, 'mean_word_length': 1.9017457129615325, 'pattern_counts': {'":': 0, '<': 695, '<?xml version=': 0, '>': 663, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7307197', 'n_tokens_mistral': 21919, 'n_tokens_neox': 21401, 'n_words': 3776}