Commits

Kai Chen committed 2a34be5

add some colorschemes

Comments (0)

Files changed (8)

bundle-colors/leetless.de/colors/phd.vim

+
+set background=dark
+
+hi clear
+
+if exists("syntax_on")
+  syntax reset
+endif
+
+let colors_name = "phd"
+
+" Very aggressive
+"let s:orange = '#f0a000'
+"let s:orange = '#b08060'
+let s:violet = '#99699c'
+let s:light_violet = '#a989ac'
+let s:yellow = '#e3d756'
+let s:red = '#d07346'
+let s:darkgreen = '#80a050'
+let s:green = '#99bf52'
+let s:lightgreen = '#e2e9af'
+let s:darkblue = '#32698f'
+let s:blue = '#5299bf'
+let s:lightblue = '#72b9bf'
+let s:light_orange = '#fbd461'
+let s:orange = '#bba401'
+let s:grey = '#808080'
+
+let s:text = '#e0e0e0'
+let s:text_hl = '#ffffff'
+let s:text_minor = '#909090'
+let s:text_very_minor = '#304050'
+
+let s:greyed = '#687898'
+
+let s:popup_bg = '#101010'
+let s:popup_bg_hl = '#000000'
+let s:popup_fg = s:text
+let s:popup_fg_hl = s:text_hl
+
+let s:bg = '#061229'
+let s:bg_hl_soft = '#1e293e'
+let s:bg_hl = '#324454'
+let s:bg_minor = '#030a17'
+
+let s:structure =  '#76cc68'
+let s:constant1 = '#c08040'
+let s:constant2 = '#d2852b'
+let s:constant3 = '#f2a54b'
+let s:control1 = '#f9f7a4'
+let s:control2 = '#c9b794'
+" '#76cc68'
+let s:border1_bg = s:bg_hl
+let s:border1_fg = s:text_minor
+let s:func = '#96b2cc'
+
+
+
+if version >= 700
+  "Tabpages
+  exe 'hi TabLineSel   guifg='.s:text_hl           .' guibg='.s:border1_bg      .' gui=underline'
+  exe 'hi TabLine      guifg='.s:text_minor        .' guibg='.s:bg      .' gui=underline'
+  exe 'hi TabLineFill  guifg='.s:text_minor        .' guibg='.s:bg      .' gui=none'
+
+  "P-Menu (auto-completion)
+  "hi Pmenu guifg=#605958 guibg=#101418 gui=none
+  "hi PmenuSel guifg=#a09998 guibg=#404040 gui=underline
+  exe 'hi CursorLine    guibg='.s:bg_hl_soft     .' gui=none'
+  exe 'hi CursorColumn  guibg='.s:bg_hl_soft     .' gui=none'
+  exe 'hi MatchParen    guifg='.s:text_hl           .' guibg='.s:bg_hl     .' gui=bold'
+
+  exe 'hi Pmenu         guifg='.s:text              .' guibg='.s:popup_bg      .' gui=none'
+  exe 'hi PmenuSel      guifg='.s:text_hl           .' guibg='.s:popup_bg_hl   .' gui=bold'
+  exe 'hi PmenuSbar                                    guibg='.s:popup_bg_hl
+  exe 'hi PmenuThumb    guifg='.s:text
+endif
+
+exe 'hi Visual guibg='.s:bg_hl
+
+"hi Cursor guifg=NONE guibg=#586068
+hi Cursor guibg=#b0d0f0
+
+exe 'hi Normal         guifg='.s:text              .' guibg='.s:bg
+"exe 'hi Underlined     guifg='.s:white             .' guibg='.s:darkgrey        .' gui=underline'
+exe 'hi NonText        guifg='.s:text_very_minor   .' guibg='.s:bg
+exe 'hi SpecialKey     guifg='.s:text_very_minor              .' guibg='.s:bg
+
+exe 'hi LineNr         guifg='.s:border1_fg        .' guibg='.s:border1_bg      .' gui=none'
+exe 'hi StatusLine     guifg='.s:text_hl           .' guibg='.s:border1_bg      .' gui=underline'
+exe 'hi StatusLineNC   guifg='.s:text_minor        .' guibg='.s:border1_bg      .' gui=underline'
+exe 'hi VertSplit      guifg='.s:border1_bg        .' guibg='.s:border1_bg      .' gui=none'
+
+exe 'hi Folded         guifg='.s:text_minor         .' guibg='.s:border1_bg  .' gui=none'
+exe 'hi FoldColumn     guifg='.s:text_minor         .' guibg='.s:border1_bg  .' gui=none'
+exe 'hi SignColumn     guifg='.s:text_minor         .' guibg='.s:border1_bg  .' gui=none'
+
+exe 'hi Comment        guifg='.s:greyed            .' guibg='.s:bg        .' gui=none'
+exe 'hi TODO           guifg='.s:greyed            .' guibg='.s:bg        .' gui=bold'
+
+exe 'hi Title          guifg='.s:red               .' guibg='.s:bg        .' gui=underline'
+
+exe 'hi Constant       guifg='.s:constant1        .' guibg='.s:bg        .' gui=none'
+exe 'hi String         guifg='.s:constant2        .' guibg='.s:bg        .' gui=none'
+exe 'hi Special        guifg='.s:constant3        .' guibg='.s:bg        .' gui=none'
+
+exe 'hi Identifier     guifg='.s:control1          .' guibg='.s:bg        .' gui=none'
+exe 'hi Statement      guifg='.s:control2          .' guibg='.s:bg        .' gui=none'
+"exe 'hi Conditional    guifg='.s:grey             .' guibg='.s:bg        .' gui=bold'
+"exe 'hi Repeat         guifg='.s:light_orange             .' guibg='.s:bg        .' gui=bold'
+exe 'hi Structure      guifg='.s:structure         .' guibg='.s:bg        .' gui=none'
+exe 'hi Function       guifg='.s:func      .' guibg='.s:bg        .' gui=none'
+
+exe 'hi PreProc        guifg='.s:light_violet           .' guibg='.s:bg        .' gui=none'
+exe 'hi Define         guifg='.s:light_violet           .' guibg='.s:bg        .' gui=none'
+exe 'hi Operator       guifg='.s:light_orange      .' guibg='.s:bg        .' gui=none'
+exe 'hi Type           guifg='.s:yellow            .' guibg='.s:bg        .' gui=none'
+
+"hi Macro guifg=#a0b0c0 gui=underline
+
+"Tabs, trailing spaces, etc (lcs)
+"hi SpecialKey guifg=#808080 guibg=#343434
+
+"hi TooLong guibg=#ff0000 guifg=#f8f8f8
+
+hi Search guifg=#606000 guibg=#c0c000 gui=bold
+
+hi Directory guifg=#dad085 gui=NONE
+hi Error guibg=#602020
+
+" Plugins
+
+"exe 'hi TagListFileName  guifg='.s:lightgrey               .' guibg='.s:darkgrey        .' gui=underline'
+"exe 'hi TagListTitle  guifg='.s:mid_grey_blue               .' guibg='.s:darkgrey        .' gui=italic'
+

bundle-colors/leetless.de/colors/twilight.vim

+
+set background=dark
+
+hi clear
+
+if exists("syntax_on")
+  syntax reset
+endif
+
+let colors_name = "twilight"
+
+let s:grey_blue = '#8a9597'
+let s:light_grey_blue = '#a0a8b0'
+let s:dark_grey_blue = '#34383c'
+let s:mid_grey_blue = '#64686c'
+let s:beige = '#ceb67f'
+let s:light_orange = '#ebc471'
+let s:yellow = '#e3d796'
+let s:violet = '#a999ac'
+let s:green = '#a2a96f'
+let s:lightgreen = '#c2c98f'
+let s:red = '#d08356'
+let s:cyan = '#74dad9'
+let s:darkgrey = '#1a1a1a'
+let s:grey = '#303030'
+let s:lightgrey = '#605958'
+let s:white = '#fffedc'
+
+if version >= 700
+  hi CursorLine guibg=#262626
+  hi CursorColumn guibg=#262626
+  hi MatchParen guifg=white guibg=#80a090 gui=bold
+
+  "Tabpages
+  hi TabLine guifg=#a09998 guibg=#202020 gui=underline
+  hi TabLineFill guifg=#a09998 guibg=#202020 gui=underline
+  hi TabLineSel guifg=#a09998 guibg=#404850 gui=underline
+
+  "P-Menu (auto-completion)
+  hi Pmenu guifg=#605958 guibg=#303030 gui=underline
+  hi PmenuSel guifg=#a09998 guibg=#404040 gui=underline
+  "PmenuSbar
+  "PmenuThumb
+endif
+
+hi Visual guibg=#404040
+
+"hi Cursor guifg=NONE guibg=#586068
+hi Cursor guibg=#b0d0f0
+
+
+exe 'hi Normal         guifg='.s:white             .' guibg='.s:darkgrey
+exe 'hi Underlined     guifg='.s:white             .' guibg='.s:darkgrey        .' gui=underline'
+exe 'hi NonText        guifg='.s:lightgrey         .' guibg='.s:grey
+exe 'hi SpecialKey     guifg='.s:grey              .' guibg='.s:darkgrey
+
+exe 'hi LineNr         guifg='.s:mid_grey_blue     .' guibg='.s:dark_grey_blue  .' gui=none'
+exe 'hi StatusLine     guifg='.s:white             .' guibg='.s:grey            .' gui=italic,underline'
+exe 'hi StatusLineNC   guifg='.s:lightgrey         .' guibg='.s:grey            .' gui=italic,underline'
+exe 'hi VertSplit      guifg='.s:grey              .' guibg='.s:grey            .' gui=none'
+
+exe 'hi Folded         guifg='.s:grey_blue         .' guibg='.s:dark_grey_blue  .' gui=none'
+exe 'hi FoldColumn     guifg='.s:grey_blue         .' guibg='.s:dark_grey_blue  .' gui=none'
+exe 'hi SignColumn     guifg='.s:grey_blue         .' guibg='.s:dark_grey_blue  .' gui=none'
+
+exe 'hi Comment        guifg='.s:mid_grey_blue     .' guibg='.s:darkgrey        .' gui=italic'
+exe 'hi TODO           guifg='.s:grey_blue         .' guibg='.s:darkgrey        .' gui=italic,bold'
+
+exe 'hi Title          guifg='.s:red               .' guibg='.s:darkgrey        .' gui=underline'
+
+exe 'hi Constant       guifg='.s:red               .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi String         guifg='.s:green             .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Special        guifg='.s:lightgreen        .' guibg='.s:darkgrey        .' gui=none'
+
+exe 'hi Identifier     guifg='.s:grey_blue         .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Statement      guifg='.s:beige             .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Conditional    guifg='.s:beige             .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Repeat         guifg='.s:beige             .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Structure      guifg='.s:beige             .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Function       guifg='.s:violet            .' guibg='.s:darkgrey        .' gui=none'
+
+exe 'hi PreProc        guifg='.s:grey_blue         .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Operator       guifg='.s:light_orange      .' guibg='.s:darkgrey        .' gui=none'
+exe 'hi Type           guifg='.s:yellow            .' guibg='.s:darkgrey        .' gui=italic'
+
+"hi Identifier guifg=#7587a6
+" Type d: 'class'
+"hi Structure guifg=#9B859D gui=underline
+"hi Function guifg=#dad085
+" dylan: method, library, ... d: if, return, ...
+"hi Statement guifg=#7187a1 gui=NONE
+" Keywords  d: import, module...
+"hi PreProc guifg=#8fbfdc
+"gui=underline
+"hi Operator guifg=#a07020
+"hi Repeat guifg=#906040 gui=underline
+"hi Type guifg=#708090
+
+"hi Type guifg=#f9ee98 gui=NONE
+
+"hi NonText guifg=#808080 guibg=#303030
+
+"hi Macro guifg=#a0b0c0 gui=underline
+
+"Tabs, trailing spaces, etc (lcs)
+"hi SpecialKey guifg=#808080 guibg=#343434
+
+"hi TooLong guibg=#ff0000 guifg=#f8f8f8
+
+hi Search guifg=#606000 guibg=#c0c000 gui=bold
+
+hi Directory guifg=#dad085 gui=NONE
+hi Error guibg=#602020
+

bundle-colors/oceandeep/colors/oceandeep.vim

+" Vim color file
+" Maintainer: Tom Regner <vim@tomsdiner.org>
+" Last Change:
+"
+" 2007-10-16 change by Alexei Alexandrov
+" - highlight CursorColumn
+"
+" 2007-08-20 change by Diederick Niehorster
+" - highlight CursorLine
+"
+" 2007-02-05
+" - included changes from Keffin Barnaby
+"   (vim>=7.0 PMenu and Spellchecking)
+"
+" 2006-09-06
+" - changed String to DarkCyan, Macro to DarkRed
+"
+" 2006-09-05
+" - more console-colors
+" - added console-colors, clean-up
+"
+" Version: 1.2.5
+" URL: http://vim.sourceforge.net/script.php?script_id=368
+
+
+""" Init
+set background=dark
+highlight clear
+if exists("syntax_on")
+    syntax reset
+endif
+let g:colors_name = "oceandeep"
+
+"""" GUI 
+
+highlight Cursor        gui=None guibg=PaleTurquoise3 guifg=White
+highlight CursorIM      gui=bold guifg=white guibg=PaleTurquoise3
+highlight CursorLine    gui=None guibg=#003853
+highlight CursorColumn  gui=None guibg=#003853
+highlight Directory     guifg=LightSeaGreen guibg=bg
+highlight DiffAdd       gui=None guifg=fg guibg=DarkCyan
+highlight DiffChange    gui=None guifg=fg guibg=Green4
+highlight DiffDelete    gui=None guifg=fg guibg=black
+highlight DiffText      gui=bold guifg=fg guibg=bg
+highlight ErrorMsg      guifg=LightYellow  guibg=FireBrick
+highlight VertSplit     gui=NONE guifg=black guibg=grey60
+highlight Folded        gui=bold guibg=#305060 guifg=#b0d0e0
+highlight FoldColumn    gui=bold guibg=#305060 guifg=#b0d0e0
+highlight IncSearch     gui=reverse guifg=fg guibg=bg
+highlight LineNr        gui=bold guibg=grey6 guifg=LightSkyBlue3
+highlight ModeMsg       guibg=DarkGreen guifg=LightGreen
+highlight MoreMsg       gui=bold  guifg=SeaGreen4 guibg=bg
+if version < 600
+    " same as SpecialKey
+    highlight NonText   guibg=#123A4A guifg=#3D5D6D
+else
+    " Bottom fill (use e.g. same as LineNr)
+    highlight NonText   gui=None guibg=#103040 guifg=LightSkyBlue
+endif
+highlight Normal        gui=None guibg=#103040 guifg=honeydew2
+highlight Question      gui=bold  guifg=SeaGreen2 guibg=bg
+highlight Search        gui=NONE guibg=LightSkyBlue4 guifg=NONE
+highlight SpecialKey    guibg=#103040 guifg=#324262
+highlight StatusLine    gui=bold guibg=grey88 guifg=black
+highlight StatusLineNC  gui=NONE guibg=grey60 guifg=grey10
+highlight Title         gui=bold  guifg=MediumOrchid1 guibg=bg
+highlight Visual        gui=reverse guibg=WHITE guifg=SeaGreen
+highlight VisualNOS     gui=bold,underline guifg=fg guibg=bg
+highlight WarningMsg    gui=bold guifg=FireBrick1 guibg=bg
+highlight WildMenu      gui=bold guibg=Chartreuse guifg=Black
+
+highlight Comment       gui=None guifg=#507080
+highlight Constant      guifg=cyan3 guibg=bg
+highlight String        gui=None guifg=turquoise2 guibg=bg
+highlight Number        gui=None guifg=Cyan guibg=bg
+highlight Boolean       gui=bold guifg=Cyan guibg=bg
+highlight Identifier    guifg=LightSkyBlue3
+highlight Function      gui=None guifg=DarkSeaGreen3 guibg=bg
+
+highlight Statement     gui=NONE guifg=LightGreen
+highlight Conditional   gui=None guifg=LightGreen guibg=bg
+highlight Repeat        gui=None guifg=SeaGreen2 guibg=bg
+highlight Operator      gui=None guifg=Chartreuse guibg=bg
+highlight Keyword       gui=bold guifg=LightGreen guibg=bg
+highlight Exception     gui=bold guifg=LightGreen guibg=bg
+
+highlight PreProc       guifg=SkyBlue1
+highlight Include       gui=None guifg=LightSteelBlue3 guibg=bg
+highlight Define        gui=None guifg=LightSteelBlue2 guibg=bg
+highlight Macro         gui=None guifg=LightSkyBlue3 guibg=bg
+highlight PreCondit     gui=None guifg=LightSkyBlue2 guibg=bg
+
+highlight Type          gui=NONE guifg=LightBlue
+highlight StorageClass  gui=None guifg=LightBlue guibg=bg
+highlight Structure     gui=None guifg=LightBlue guibg=bg
+highlight Typedef       gui=None guifg=LightBlue guibg=bg
+
+highlight Special       gui=bold guifg=aquamarine3
+highlight Underlined    gui=underline guifg=honeydew4 guibg=bg
+highlight Ignore        guifg=#204050
+highlight Error         guifg=LightYellow  guibg=FireBrick
+highlight Todo          guifg=Cyan guibg=#507080
+if v:version >= 700
+    highlight PMenu      gui=bold guibg=LightSkyBlue4 guifg=honeydew2
+    highlight PMenuSel   gui=bold guibg=DarkGreen guifg=honeydew2
+    highlight PMenuSbar  gui=bold guibg=LightSkyBlue4
+    highlight PMenuThumb gui=bold guibg=DarkGreen
+    highlight SpellBad   gui=undercurl guisp=Red
+    highlight SpellRare  gui=undercurl guisp=Orange
+    highlight SpellLocal gui=undercurl guisp=Orange
+    highlight SpellCap   gui=undercurl guisp=Yellow
+endif
+
+""" Console
+if v:version >= 700
+    highlight PMenu      cterm=bold ctermbg=DarkGreen ctermfg=Gray
+    highlight PMenuSel   cterm=bold ctermbg=Yellow ctermfg=Gray
+    highlight PMenuSbar  cterm=bold ctermbg=DarkGreen
+    highlight PMenuThumb cterm=bold ctermbg=Yellow
+    highlight SpellBad   ctermbg=Red
+    highlight SpellRare  ctermbg=Red
+    highlight SpellLocal ctermbg=Red
+    highlight SpellCap   ctermbg=Yellow
+endif
+
+highlight Normal        ctermfg=Gray ctermbg=None
+highlight Search        ctermfg=Black ctermbg=Red cterm=NONE
+highlight Visual        cterm=reverse
+highlight Cursor        ctermfg=Black ctermbg=Green cterm=bold
+highlight Special       ctermfg=Brown
+highlight Comment       ctermfg=DarkGray
+highlight StatusLine    ctermfg=Blue ctermbg=White
+highlight Statement     ctermfg=Yellow cterm=NONE
+highlight Type          cterm=NONE
+highlight Macro         ctermfg=DarkRed
+highlight Identifier    ctermfg=DarkYellow
+highlight Structure     ctermfg=DarkGreen
+highlight String        ctermfg=DarkCyan
+
+" vim: sw=4 ts=4 et

bundle-colors/tomorrow-theme/colors/Tomorrow-Night-Blue.vim

+" Tomorrow Night Blue - Full Colour and 256 Colour
+" http://chriskempson.com
+"
+" Hex colour conversion functions borrowed from the theme "Desert256""
+
+" Default GUI Colours
+let s:foreground = "ffffff"
+let s:background = "002451"
+let s:selection = "003f8e"
+let s:line = "00346e"
+let s:comment = "7285b7"
+let s:red = "ff9da4"
+let s:orange = "ffc58f"
+let s:yellow = "ffeead"
+let s:green = "d1f1a9"
+let s:aqua = "99ffff"
+let s:blue = "bbdaff"
+let s:purple = "ebbbff"
+let s:window = "4d5057"
+
+set background=dark
+hi clear
+syntax reset
+
+let g:colors_name = "Tomorrow-Night-Blue"
+
+if has("gui_running") || &t_Co == 88 || &t_Co == 256
+	" Returns an approximate grey index for the given grey level
+	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_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:selection, "", "")
+	call <SID>X("NonText", s:selection, "", "")
+	call <SID>X("SpecialKey", s:selection, "", "")
+	call <SID>X("Search", s:background, s:yellow, "")
+	call <SID>X("TabLine", s:foreground, s:background, "reverse")
+	call <SID>X("StatusLine", s:window, s:yellow, "reverse")
+	call <SID>X("StatusLineNC", s:window, s:foreground, "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:background, "")
+	if version >= 700
+		call <SID>X("CursorLine", "", s:line, "none")
+		call <SID>X("CursorColumn", "", s:line, "none")
+		call <SID>X("PMenu", s:foreground, s:selection, "none")
+		call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
+	end
+	if version >= 703
+		call <SID>X("ColorColumn", "", s:line, "none")
+	end
+
+	" Standard Highlighting
+	call <SID>X("Comment", s:comment, "", "")
+	call <SID>X("Todo", s:comment, s:background, "")
+	call <SID>X("Title", s:comment, "", "")
+	call <SID>X("Identifier", s:red, "", "none")
+	call <SID>X("Statement", s:foreground, "", "")
+	call <SID>X("Conditional", s:foreground, "", "")
+	call <SID>X("Repeat", s:foreground, "", "")
+	call <SID>X("Structure", s:purple, "", "")
+	call <SID>X("Function", s:blue, "", "")
+	call <SID>X("Constant", s:orange, "", "")
+	call <SID>X("String", s:green, "", "")
+	call <SID>X("Special", s:foreground, "", "")
+	call <SID>X("PreProc", s:purple, "", "")
+	call <SID>X("Operator", s:aqua, "", "none")
+	call <SID>X("Type", s:blue, "", "none")
+	call <SID>X("Define", s:purple, "", "none")
+	call <SID>X("Include", s:blue, "", "")
+	"call <SID>X("Ignore", "666666", "", "")
+
+	" Vim Highlighting
+	call <SID>X("vimCommand", s:red, "", "none")
+
+	" C Highlighting
+	call <SID>X("cType", s:yellow, "", "")
+	call <SID>X("cStorageClass", s:purple, "", "")
+	call <SID>X("cConditional", s:purple, "", "")
+	call <SID>X("cRepeat", s:purple, "", "")
+
+	" PHP Highlighting
+	call <SID>X("phpVarSelector", s:red, "", "")
+	call <SID>X("phpKeyword", s:purple, "", "")
+	call <SID>X("phpRepeat", s:purple, "", "")
+	call <SID>X("phpConditional", s:purple, "", "")
+	call <SID>X("phpStatement", s:purple, "", "")
+	call <SID>X("phpMemberSelector", s:foreground, "", "")
+
+	" Ruby Highlighting
+	call <SID>X("rubySymbol", s:green, "", "")
+	call <SID>X("rubyConstant", s:yellow, "", "")
+	call <SID>X("rubyAttribute", s:blue, "", "")
+	call <SID>X("rubyInclude", s:blue, "", "")
+	call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
+	call <SID>X("rubyCurlyBlock", s:orange, "", "")
+	call <SID>X("rubyStringDelimiter", s:green, "", "")
+	call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
+	call <SID>X("rubyConditional", s:purple, "", "")
+	call <SID>X("rubyRepeat", s:purple, "", "")
+
+	" Python Highlighting
+	call <SID>X("pythonInclude", s:purple, "", "")
+	call <SID>X("pythonStatement", s:purple, "", "")
+	call <SID>X("pythonConditional", s:purple, "", "")
+	call <SID>X("pythonFunction", s:blue, "", "")
+
+	" JavaScript Highlighting
+	call <SID>X("javaScriptBraces", s:foreground, "", "")
+	call <SID>X("javaScriptFunction", s:purple, "", "")
+	call <SID>X("javaScriptConditional", s:purple, "", "")
+	call <SID>X("javaScriptRepeat", s:purple, "", "")
+	call <SID>X("javaScriptNumber", s:orange, "", "")
+	call <SID>X("javaScriptMember", s:orange, "", "")
+
+	" Diff Highlighting
+	call <SID>X("diffAdded", s:green, "", "")
+	call <SID>X("diffRemoved", s:red, "", "")
+
+	" 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

bundle-colors/tomorrow-theme/colors/Tomorrow-Night-Bright.vim

+" Tomorrow Night Bright - Full Colour and 256 Colour
+" http://chriskempson.com
+"
+" Hex colour conversion functions borrowed from the theme "Desert256""
+
+" Default GUI Colours
+let s:foreground = "eaeaea"
+let s:background = "000000"
+let s:selection = "424242"
+let s:line = "2a2a2a"
+let s:comment = "969896"
+let s:red = "d54e53"
+let s:orange = "e78c45"
+let s:yellow = "e7c547"
+let s:green = "b9ca4a"
+let s:aqua = "70c0b1"
+let s:blue = "7aa6da"
+let s:purple = "c397d8"
+let s:window = "4d5057"
+
+set background=dark
+hi clear
+syntax reset
+
+let g:colors_name = "Tomorrow-Night-Bright"
+
+if has("gui_running") || &t_Co == 88 || &t_Co == 256
+	" Returns an approximate grey index for the given grey level
+	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_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:selection, "", "")
+	call <SID>X("NonText", s:selection, "", "")
+	call <SID>X("SpecialKey", s:selection, "", "")
+	call <SID>X("Search", s:background, s:yellow, "")
+	call <SID>X("TabLine", s:foreground, s:background, "reverse")
+	call <SID>X("StatusLine", s:window, s:yellow, "reverse")
+	call <SID>X("StatusLineNC", s:window, s:foreground, "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:background, "")
+	if version >= 700
+		call <SID>X("CursorLine", "", s:line, "none")
+		call <SID>X("CursorColumn", "", s:line, "none")
+		call <SID>X("PMenu", s:foreground, s:selection, "none")
+		call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
+	end
+	if version >= 703
+		call <SID>X("ColorColumn", "", s:line, "none")
+	end
+
+	" Standard Highlighting
+	call <SID>X("Comment", s:comment, "", "")
+	call <SID>X("Todo", s:comment, s:background, "")
+	call <SID>X("Title", s:comment, "", "")
+	call <SID>X("Identifier", s:red, "", "none")
+	call <SID>X("Statement", s:foreground, "", "")
+	call <SID>X("Conditional", s:foreground, "", "")
+	call <SID>X("Repeat", s:foreground, "", "")
+	call <SID>X("Structure", s:purple, "", "")
+	call <SID>X("Function", s:blue, "", "")
+	call <SID>X("Constant", s:orange, "", "")
+	call <SID>X("String", s:green, "", "")
+	call <SID>X("Special", s:foreground, "", "")
+	call <SID>X("PreProc", s:purple, "", "")
+	call <SID>X("Operator", s:aqua, "", "none")
+	call <SID>X("Type", s:blue, "", "none")
+	call <SID>X("Define", s:purple, "", "none")
+	call <SID>X("Include", s:blue, "", "")
+	"call <SID>X("Ignore", "666666", "", "")
+
+	" Vim Highlighting
+	call <SID>X("vimCommand", s:red, "", "none")
+
+	" C Highlighting
+	call <SID>X("cType", s:yellow, "", "")
+	call <SID>X("cStorageClass", s:purple, "", "")
+	call <SID>X("cConditional", s:purple, "", "")
+	call <SID>X("cRepeat", s:purple, "", "")
+
+	" PHP Highlighting
+	call <SID>X("phpVarSelector", s:red, "", "")
+	call <SID>X("phpKeyword", s:purple, "", "")
+	call <SID>X("phpRepeat", s:purple, "", "")
+	call <SID>X("phpConditional", s:purple, "", "")
+	call <SID>X("phpStatement", s:purple, "", "")
+	call <SID>X("phpMemberSelector", s:foreground, "", "")
+
+	" Ruby Highlighting
+	call <SID>X("rubySymbol", s:green, "", "")
+	call <SID>X("rubyConstant", s:yellow, "", "")
+	call <SID>X("rubyAttribute", s:blue, "", "")
+	call <SID>X("rubyInclude", s:blue, "", "")
+	call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
+	call <SID>X("rubyCurlyBlock", s:orange, "", "")
+	call <SID>X("rubyStringDelimiter", s:green, "", "")
+	call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
+	call <SID>X("rubyConditional", s:purple, "", "")
+	call <SID>X("rubyRepeat", s:purple, "", "")
+
+	" Python Highlighting
+	call <SID>X("pythonInclude", s:purple, "", "")
+	call <SID>X("pythonStatement", s:purple, "", "")
+	call <SID>X("pythonConditional", s:purple, "", "")
+	call <SID>X("pythonFunction", s:blue, "", "")
+
+	" JavaScript Highlighting
+	call <SID>X("javaScriptBraces", s:foreground, "", "")
+	call <SID>X("javaScriptFunction", s:purple, "", "")
+	call <SID>X("javaScriptConditional", s:purple, "", "")
+	call <SID>X("javaScriptRepeat", s:purple, "", "")
+	call <SID>X("javaScriptNumber", s:orange, "", "")
+	call <SID>X("javaScriptMember", s:orange, "", "")
+
+	" Diff Highlighting
+	call <SID>X("diffAdded", s:green, "", "")
+	call <SID>X("diffRemoved", s:red, "", "")
+
+	" 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

bundle-colors/tomorrow-theme/colors/Tomorrow-Night-Eighties.vim

+" Tomorrow Night Eighties - Full Colour and 256 Colour
+" http://chriskempson.com
+"
+" Hex colour conversion functions borrowed from the theme "Desert256""
+
+" Default GUI Colours
+let s:foreground = "cccccc"
+let s:background = "2d2d2d"
+let s:selection = "515151"
+let s:line = "393939"
+let s:comment = "999999"
+let s:red = "f2777a"
+let s:orange = "f99157"
+let s:yellow = "ffcc66"
+let s:green = "99cc99"
+let s:aqua = "009999"
+let s:blue = "99cccc"
+let s:purple = "cc99cc"
+let s:window = "4d5057"
+
+set background=dark
+hi clear
+syntax reset
+
+let g:colors_name = "Tomorrow-Night-Eighties"
+
+if has("gui_running") || &t_Co == 88 || &t_Co == 256
+	" Returns an approximate grey index for the given grey level
+	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_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:selection, "", "")
+	call <SID>X("NonText", s:selection, "", "")
+	call <SID>X("SpecialKey", s:selection, "", "")
+	call <SID>X("Search", s:background, s:yellow, "")
+	call <SID>X("TabLine", s:foreground, s:background, "reverse")
+	call <SID>X("StatusLine", s:window, s:yellow, "reverse")
+	call <SID>X("StatusLineNC", s:window, s:foreground, "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:background, "")
+	if version >= 700
+		call <SID>X("CursorLine", "", s:line, "none")
+		call <SID>X("CursorColumn", "", s:line, "none")
+		call <SID>X("PMenu", s:foreground, s:selection, "none")
+		call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
+	end
+	if version >= 703
+		call <SID>X("ColorColumn", "", s:line, "none")
+	end
+
+	" Standard Highlighting
+	call <SID>X("Comment", s:comment, "", "")
+	call <SID>X("Todo", s:comment, s:background, "")
+	call <SID>X("Title", s:comment, "", "")
+	call <SID>X("Identifier", s:red, "", "none")
+	call <SID>X("Statement", s:foreground, "", "")
+	call <SID>X("Conditional", s:foreground, "", "")
+	call <SID>X("Repeat", s:foreground, "", "")
+	call <SID>X("Structure", s:purple, "", "")
+	call <SID>X("Function", s:blue, "", "")
+	call <SID>X("Constant", s:orange, "", "")
+	call <SID>X("String", s:green, "", "")
+	call <SID>X("Special", s:foreground, "", "")
+	call <SID>X("PreProc", s:purple, "", "")
+	call <SID>X("Operator", s:aqua, "", "none")
+	call <SID>X("Type", s:blue, "", "none")
+	call <SID>X("Define", s:purple, "", "none")
+	call <SID>X("Include", s:blue, "", "")
+	"call <SID>X("Ignore", "666666", "", "")
+
+	" Vim Highlighting
+	call <SID>X("vimCommand", s:red, "", "none")
+
+	" C Highlighting
+	call <SID>X("cType", s:yellow, "", "")
+	call <SID>X("cStorageClass", s:purple, "", "")
+	call <SID>X("cConditional", s:purple, "", "")
+	call <SID>X("cRepeat", s:purple, "", "")
+
+	" PHP Highlighting
+	call <SID>X("phpVarSelector", s:red, "", "")
+	call <SID>X("phpKeyword", s:purple, "", "")
+	call <SID>X("phpRepeat", s:purple, "", "")
+	call <SID>X("phpConditional", s:purple, "", "")
+	call <SID>X("phpStatement", s:purple, "", "")
+	call <SID>X("phpMemberSelector", s:foreground, "", "")
+
+	" Ruby Highlighting
+	call <SID>X("rubySymbol", s:green, "", "")
+	call <SID>X("rubyConstant", s:yellow, "", "")
+	call <SID>X("rubyAttribute", s:blue, "", "")
+	call <SID>X("rubyInclude", s:blue, "", "")
+	call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
+	call <SID>X("rubyCurlyBlock", s:orange, "", "")
+	call <SID>X("rubyStringDelimiter", s:green, "", "")
+	call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
+	call <SID>X("rubyConditional", s:purple, "", "")
+	call <SID>X("rubyRepeat", s:purple, "", "")
+
+	" Python Highlighting
+	call <SID>X("pythonInclude", s:purple, "", "")
+	call <SID>X("pythonStatement", s:purple, "", "")
+	call <SID>X("pythonConditional", s:purple, "", "")
+	call <SID>X("pythonFunction", s:blue, "", "")
+
+	" JavaScript Highlighting
+	call <SID>X("javaScriptBraces", s:foreground, "", "")
+	call <SID>X("javaScriptFunction", s:purple, "", "")
+	call <SID>X("javaScriptConditional", s:purple, "", "")
+	call <SID>X("javaScriptRepeat", s:purple, "", "")
+	call <SID>X("javaScriptNumber", s:orange, "", "")
+	call <SID>X("javaScriptMember", s:orange, "", "")
+
+	" Diff Highlighting
+	call <SID>X("diffAdded", s:green, "", "")
+	call <SID>X("diffRemoved", s:red, "", "")
+
+	" 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

bundle-colors/tomorrow-theme/colors/Tomorrow-Night.vim

+" Tomorrow Night - Full Colour and 256 Colour
+" http://chriskempson.com
+"
+" Hex colour conversion functions borrowed from the theme "Desert256""
+
+" Default GUI Colours
+let s:foreground = "c5c8c6"
+let s:background = "1d1f21"
+let s:selection = "373b41"
+let s:line = "282a2e"
+let s:comment = "969896"
+let s:red = "cc6666"
+let s:orange = "de935f"
+let s:yellow = "f0c674"
+let s:green = "b5bd68"
+let s:aqua = "8abeb7"
+let s:blue = "81a2be"
+let s:purple = "b294bb"
+let s:window = "4d5057"
+
+" Console 256 Colours
+if !has("gui_running")
+	let s:background = "303030"
+	let s:window = "5e5e5e"
+	let s:line = "3a3a3a"
+	let s:selection = "585858"
+end
+
+set background=dark
+hi clear
+syntax reset
+
+let g:colors_name = "Tomorrow-Night"
+
+if has("gui_running") || &t_Co == 88 || &t_Co == 256
+	" Returns an approximate grey index for the given grey level
+	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_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:selection, "", "")
+	call <SID>X("NonText", s:selection, "", "")
+	call <SID>X("SpecialKey", s:selection, "", "")
+	call <SID>X("Search", s:background, s:yellow, "")
+	call <SID>X("TabLine", s:foreground, s:background, "reverse")
+	call <SID>X("StatusLine", s:window, s:yellow, "reverse")
+	call <SID>X("StatusLineNC", s:window, s:foreground, "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:background, "")
+	if version >= 700
+		call <SID>X("CursorLine", "", s:line, "none")
+		call <SID>X("CursorColumn", "", s:line, "none")
+		call <SID>X("PMenu", s:foreground, s:selection, "none")
+		call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
+		call <SID>X("SignColumn", "", s:background, "none")
+	end
+	if version >= 703
+		call <SID>X("ColorColumn", "", s:line, "none")
+	end
+
+	" Standard Highlighting
+	call <SID>X("Comment", s:comment, "", "")
+	call <SID>X("Todo", s:comment, s:background, "")
+	call <SID>X("Title", s:comment, "", "")
+	call <SID>X("Identifier", s:red, "", "none")
+	call <SID>X("Statement", s:foreground, "", "")
+	call <SID>X("Conditional", s:foreground, "", "")
+	call <SID>X("Repeat", s:foreground, "", "")
+	call <SID>X("Structure", s:purple, "", "")
+	call <SID>X("Function", s:blue, "", "")
+	call <SID>X("Constant", s:orange, "", "")
+	call <SID>X("String", s:green, "", "")
+	call <SID>X("Special", s:foreground, "", "")
+	call <SID>X("PreProc", s:purple, "", "")
+	call <SID>X("Operator", s:aqua, "", "none")
+	call <SID>X("Type", s:blue, "", "none")
+	call <SID>X("Define", s:purple, "", "none")
+	call <SID>X("Include", s:blue, "", "")
+	"call <SID>X("Ignore", "666666", "", "")
+
+	" Vim Highlighting
+	call <SID>X("vimCommand", s:red, "", "none")
+
+	" C Highlighting
+	call <SID>X("cType", s:yellow, "", "")
+	call <SID>X("cStorageClass", s:purple, "", "")
+	call <SID>X("cConditional", s:purple, "", "")
+	call <SID>X("cRepeat", s:purple, "", "")
+
+	" PHP Highlighting
+	call <SID>X("phpVarSelector", s:red, "", "")
+	call <SID>X("phpKeyword", s:purple, "", "")
+	call <SID>X("phpRepeat", s:purple, "", "")
+	call <SID>X("phpConditional", s:purple, "", "")
+	call <SID>X("phpStatement", s:purple, "", "")
+	call <SID>X("phpMemberSelector", s:foreground, "", "")
+
+	" Ruby Highlighting
+	call <SID>X("rubySymbol", s:green, "", "")
+	call <SID>X("rubyConstant", s:yellow, "", "")
+	call <SID>X("rubyAttribute", s:blue, "", "")
+	call <SID>X("rubyInclude", s:blue, "", "")
+	call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
+	call <SID>X("rubyCurlyBlock", s:orange, "", "")
+	call <SID>X("rubyStringDelimiter", s:green, "", "")
+	call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
+	call <SID>X("rubyConditional", s:purple, "", "")
+	call <SID>X("rubyRepeat", s:purple, "", "")
+
+	" Python Highlighting
+	call <SID>X("pythonInclude", s:purple, "", "")
+	call <SID>X("pythonStatement", s:purple, "", "")
+	call <SID>X("pythonConditional", s:purple, "", "")
+	call <SID>X("pythonFunction", s:blue, "", "")
+
+	" JavaScript Highlighting
+	call <SID>X("javaScriptBraces", s:foreground, "", "")
+	call <SID>X("javaScriptFunction", s:purple, "", "")
+	call <SID>X("javaScriptConditional", s:purple, "", "")
+	call <SID>X("javaScriptRepeat", s:purple, "", "")
+	call <SID>X("javaScriptNumber", s:orange, "", "")
+	call <SID>X("javaScriptMember", s:orange, "", "")
+
+	" Diff Highlighting
+	call <SID>X("diffAdded", s:green, "", "")
+	call <SID>X("diffRemoved", s:red, "", "")
+
+    " ShowMarks Highlighting
+    call <SID>X("ShowMarksHLl", s:orange, s:background, "none")
+    call <SID>X("ShowMarksHLo", s:purple, s:background, "none")
+    call <SID>X("ShowMarksHLu", s:yellow, s:background, "none")
+    call <SID>X("ShowMarksHLm", s:aqua, s:background, "none")
+
+	" 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

bundle-colors/tomorrow-theme/colors/Tomorrow.vim

+" Tomorrow - Full Colour and 256 Colour
+" http://chriskempson.com
+"
+" Hex colour conversion functions borrowed from the theme "Desert256""
+
+" Default GUI Colours
+let s:foreground = "4d4d4c"
+let s:background = "fafafafa"
+let s:selection = "d6d6d6"
+let s:line = "efefef"
+let s:comment = "8e908c"
+let s:red = "c82829"
+let s:orange = "f5871f"
+let s:yellow = "eab700"
+let s:green = "718c00"
+let s:aqua = "3e999f"
+let s:blue = "4271ae"
+let s:purple = "8959a8"
+let s:window = "efefef"
+
+set background=light
+hi clear
+syntax reset
+
+let g:colors_name = "Tomorrow"
+
+if has("gui_running") || &t_Co == 88 || &t_Co == 256
+	" Returns an approximate grey index for the given grey level
+	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