@@ -0,0 +1,247 @@
1+" Vim color file: calmar256-dark.vim
2+" Last Change: 21. Aug 2007
3+" License: public domain
4+" Maintainer:: calmar <mac@calmar.ws>
5+"
6+" for a 256 color capable terminal like xterm-256color, ... or gvim as well
7+" "{{{
8+" it only works in such a terminal and when you have:
9+" set t_Co=256
10+" in your vimrc"}}}
11+
12+" {{{ t_Co=256 is set - check
13+if &t_Co != 256 && ! has("gui_running")
14+ echomsg ""
15+ echomsg "write 'set t_Co=256' in your .vimrc or this file won't load"
16+ echomsg ""
17+ finish
18+endif
19+" }}}
20+" {{{ reset colors and set colors_name and store cpo setting
21+set background=dark
22+hi clear
23+if exists("syntax_on")
24+ syntax reset
25+endif
26+
27+let g:colors_name = "calmar256-light"
28+
29+let s:save_cpo = &cpo
30+set cpo&vim
31+" }}}
32+
33+" FORMAT:"{{{
34+"
35+" \ ["color-group", "term-style", "foreground-color", "background-color", "gui-style", "under-curl-color" ],
36+"
37+" 'term-style'/'gui-style' can be:
38+" bold, underline, undercurl, reverse, inverse, italic, standout, NONE
39+"
40+" if gui-style is empty, the term-style value is used for the gui
41+"
42+" (Note: not everything is supported by a terminal nor the gui)
43+"
44+" besides empty values defaults to 'NONE"
45+"
46+" may also check: :help highlight-groups
47+" :help hl-<highlight-group> "
48+"
49+" for the Color numbers (0-255) for the foreground/background and under-curl-colors:
50+" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
51+
52+"}}}
53+"============================================================
54+" EDIT/ADD your style/colors below
55+"------------------------------------------------------------
56+
57+" Format: \ ["color-group",
58+" "term-style",
59+" "foreground-color",
60+" "background-color",
61+" "gui-style",
62+" "under-curl-color" ],
63+
64+let s:colors256 = [
65+ \ ["Normal", "", "17", "230", "", "" ],
66+ \ ["Cursor", "", "", "226", "", "" ],
67+ \ ["CursorLine", "", "", "222", "", "" ],
68+ \ ["CursorColumn", "", "", "223", "", "" ],
69+ \ ["Incsearch", "bold", "195", "28", "", "" ],
70+ \ ["Search", "", "", "119", "", "" ],
71+ \ ["ErrorMsg", "bold", "16", "202", "", "" ],
72+ \ ["WarningMsg", "bold", "16", "190", "", "" ],
73+ \ ["ModeMsg", "bold", "16", "51", "", "" ],
74+ \ ["MoreMsg", "bold", "16", "154", "", "" ],
75+ \ ["Question", "bold", "27", "", "", "" ],
76+ \ ["StatusLine", "", "231", "30", "", "" ],
77+ \ ["StatusLineNC", "", "20", "250", "", "" ],
78+ \ ["User1", "bold", "28", "", "", "" ],
79+ \ ["User2", "bold", "39", "", "", "" ],
80+ \ ["VertSplit", "", "84", "22", "", "" ],
81+ \ ["WildMenu", "bold", "87", "35", "", "" ],
82+ \ ["DiffText", "", "16", "190", "", "" ],
83+ \ ["DiffChange", "", "16", "83", "", "" ],
84+ \ ["DiffDelete", "", "79", "124", "", "" ],
85+ \ ["DiffAdd", "", "79", "21", "", "" ],
86+ \ ["Folded", "bold", "19", "115", "", "" ],
87+ \ ["FoldedColumn", "", "39", "190", "", "" ],
88+ \ ["FoldColumn", "", "19", "115", "", "" ],
89+ \ ["Directory", "", "28", "", "", "" ],
90+ \ ["LineNr", "", "63", "228", "", "" ],
91+ \ ["NonText", "", "243", "229", "", "" ],
92+ \ ["SpecialKey", "", "190", "", "", "" ],
93+ \ ["Title", "bold", "18", "", "", "" ],
94+ \ ["Visual", "", "", "220", "", "" ],
95+ \ ["Comment", "", "21", "255", "", "" ],
96+ \ ["Costant", "", "58", "", "", "" ],
97+ \ ["String", "", "160", "", "", "" ],
98+ \ ["Error", "", "130", "", "", "" ],
99+ \ ["Identifier", "", "31", "", "", "" ],
100+ \ ["Ignore", "", "", "", "", "" ],
101+ \ ["Number", "bold", "23", "", "", "" ],
102+ \ ["PreProc", "", "26", "255", "", "" ],
103+ \ ["Special", "", "", "229", "", "" ],
104+ \ ["SpecialChar", "", "22", "", "", "" ],
105+ \ ["Statement", "", "36", "", "", "" ],
106+ \ ["Todo", "", "", "229", "", "" ],
107+ \ ["Type", "", "20", "", "", "" ],
108+ \ ["Underlined", "bold", "25", "", "", "" ],
109+ \ ["TaglistTagName","bold", "29", "118", "", "" ]]
110+
111+let s:colorvim7 = [
112+ \ ["Pmenu", "", "229", "29", "", "" ],
113+ \ ["PmenuSel", "bold", "232", "226", "", "" ],
114+ \ ["PmenuSbar", "", "16", "119", "", "" ],
115+ \ ["PmenuThumb", "", "16", "11", "", "" ],
116+ \ ["SpellBad", "undercurl", "","", "undercurl","160" ],
117+ \ ["SpellRare", "", "", "228", "", "" ],
118+ \ ["SpellLocal", "", "", "224", "", "" ],
119+ \ ["SpellCap", "", "", "247", "", "" ],
120+ \ ["MatchParen", "bold", "15", "22", "", "" ],
121+ \ ["TabLine", "", "252", "22", "", "" ],
122+ \ ["TabLineSel", "bold", "253", "30", "", "" ],
123+ \ ["TabLineFill", "", "247", "16", "", "" ]]
124+
125+"============================================================
126+" * NO NEED * to edit below (unless bugfixing)
127+"============================================================
128+"
129+" {{{ change empty fields to "NONE"
130+
131+for s:col in s:colors256
132+ for i in [1, 2, 3, 4, 5]
133+ if s:col[i] == ""
134+ let s:col[i] = "NONE"
135+ endif
136+ endfor
137+endfor
138+
139+for s:col in s:colorvim7
140+ for i in [1, 2, 3, 4, 5]
141+ if s:col[i] == ""
142+ let s:col[i] = "NONE"
143+ endif
144+ endfor
145+endfor
146+" }}}
147+" {{{ check args helper function
148+function! s:checkargs(arg)
149+ if a:arg+0 == 0 && a:arg != "0" "its a string
150+ return a:arg
151+ else
152+ return s:cmap[a:arg+0] "get rgb color based on the number
153+ endif
154+endfunction
155+" }}}
156+" {{{ guisetcolor helper function
157+"
158+function! s:guisetcolor(colarg)
159+ " if gui-style is empty use (c)term-style also for gui
160+ if a:colarg[4] == ""
161+ let guival = a:colarg[1]
162+ else
163+ let guival = a:colarg[4]
164+ endif
165+
166+ let fg = s:checkargs(a:colarg[2])
167+ let bg = s:checkargs(a:colarg[3])
168+ let sp = s:checkargs(a:colarg[5])
169+
170+ exec "hi ".a:colarg[0]." gui=".guival." guifg=".fg." guibg=".bg." guisp=".sp
171+endfunction
172+" }}}
173+" {{{ color setup for terminal
174+if ! has("gui_running")
175+ for s:col in s:colors256
176+ exec "hi ".s:col[0]." cterm=".s:col[1]." ctermfg=".s:col[2]." ctermbg=".s:col[3]
177+ endfor
178+ if v:version >= 700
179+ for s:col in s:colorvim7
180+ exec "hi ".s:col[0]." cterm=".s:col[1]." ctermfg=".s:col[2]." ctermbg=".s:col[3]
181+ endfor
182+ endif
183+else
184+" }}}
185+ " color-mapping array {{{
186+ " number of vim colors and #html colors equivalent for gui
187+ let s:cmap = [
188+ \ "#000000", "#800000", "#008000", "#808000",
189+ \ "#000080", "#800080", "#008080", "#c0c0c0",
190+ \ "#808080", "#ff0000", "#00ff00", "#ffff00",
191+ \ "#0000ff", "#ff00ff", "#00ffff", "#ffffff",
192+ \
193+ \ "#000000", "#00005f", "#000087", "#0000af", "#0000d7", "#0000ff",
194+ \ "#005f00", "#005f5f", "#005f87", "#005faf", "#005fd7", "#005fff",
195+ \ "#008700", "#00875f", "#008787", "#0087af", "#0087d7", "#0087ff",
196+ \ "#00af00", "#00af5f", "#00af87", "#00afaf", "#00afd7", "#00afff",
197+ \ "#00d700", "#00d75f", "#00d787", "#00d7af", "#00d7d7", "#00d7ff",
198+ \ "#00ff00", "#00ff5f", "#00ff87", "#00ffaf", "#00ffd7", "#00ffff",
199+ \ "#5f0000", "#5f005f", "#5f0087", "#5f00af", "#5f00d7", "#5f00ff",
200+ \ "#5f5f00", "#5f5f5f", "#5f5f87", "#5f5faf", "#5f5fd7", "#5f5fff",
201+ \ "#5f8700", "#5f875f", "#5f8787", "#5f87af", "#5f87d7", "#5f87ff",
202+ \ "#5faf00", "#5faf5f", "#5faf87", "#5fafaf", "#5fafd7", "#5fafff",
203+ \ "#5fd700", "#5fd75f", "#5fd787", "#5fd7af", "#5fd7d7", "#5fd7ff",
204+ \ "#5fff00", "#5fff5f", "#5fff87", "#5fffaf", "#5fffd7", "#5fffff",
205+ \ "#870000", "#87005f", "#870087", "#8700af", "#8700d7", "#8700ff",
206+ \ "#875f00", "#875f5f", "#875f87", "#875faf", "#875fd7", "#875fff",
207+ \ "#878700", "#87875f", "#878787", "#8787af", "#8787d7", "#8787ff",
208+ \ "#87af00", "#87af5f", "#87af87", "#87afaf", "#87afd7", "#87afff",
209+ \ "#87d700", "#87d75f", "#87d787", "#87d7af", "#87d7d7", "#87d7ff",
210+ \ "#87ff00", "#87ff5f", "#87ff87", "#87ffaf", "#87ffd7", "#87ffff",
211+ \ "#af0000", "#af005f", "#af0087", "#af00af", "#af00d7", "#af00ff",
212+ \ "#af5f00", "#af5f5f", "#af5f87", "#af5faf", "#af5fd7", "#af5fff",
213+ \ "#af8700", "#af875f", "#af8787", "#af87af", "#af87d7", "#af87ff",
214+ \ "#afaf00", "#afaf5f", "#afaf87", "#afafaf", "#afafd7", "#afafff",
215+ \ "#afd700", "#afd75f", "#afd787", "#afd7af", "#afd7d7", "#afd7ff",
216+ \ "#afff00", "#afff5f", "#afff87", "#afffaf", "#afffd7", "#afffff",
217+ \ "#d70000", "#d7005f", "#d70087", "#d700af", "#d700d7", "#d700ff",
218+ \ "#d75f00", "#d75f5f", "#d75f87", "#d75faf", "#d75fd7", "#d75fff",
219+ \ "#d78700", "#d7875f", "#d78787", "#d787af", "#d787d7", "#d787ff",
220+ \ "#d7af00", "#d7af5f", "#d7af87", "#d7afaf", "#d7afd7", "#d7afff",
221+ \ "#d7d700", "#d7d75f", "#d7d787", "#d7d7af", "#d7d7d7", "#d7d7ff",
222+ \ "#d7ff00", "#d7ff5f", "#d7ff87", "#d7ffaf", "#d7ffd7", "#d7ffff",
223+ \ "#ff0000", "#ff005f", "#ff0087", "#ff00af", "#ff00d7", "#ff00ff",
224+ \ "#ff5f00", "#ff5f5f", "#ff5f87", "#ff5faf", "#ff5fd7", "#ff5fff",
225+ \ "#ff8700", "#ff875f", "#ff8787", "#ff87af", "#ff87d7", "#ff87ff",
226+ \ "#ffaf00", "#ffaf5f", "#ffaf87", "#ffafaf", "#ffafd7", "#ffafff",
227+ \ "#ffd700", "#ffd75f", "#ffd787", "#ffd7af", "#ffd7d7", "#ffd7ff",
228+ \ "#ffff00", "#ffff5f", "#ffff87", "#ffffaf", "#ffffd7", "#ffffff",
229+ \
230+ \ "#080808", "#121212", "#1c1c1c", "#262626", "#303030", "#3a3a3a",
231+ \ "#444444", "#4e4e4e", "#585858", "#606060", "#666666", "#767676",
232+ \ "#808080", "#8a8a8a", "#949494", "#9e9e9e", "#a8a8a8", "#b2b2b2",
233+ \ "#bcbcbc", "#c6c6c6", "#d0d0d0", "#dadada", "#e4e4e4", "#eeeeee" ]
234+ " }}}
235+" {{{ color setup for gvim
236+ for s:col in s:colors256
237+ call s:guisetcolor(s:col)
238+ endfor
239+ if v:version >= 700
240+ for s:col in s:colorvim7
241+ call s:guisetcolor(s:col)
242+ endfor
243+ endif
244+endif
245+" }}}
246+let &cpo = s:save_cpo " restoring &cpo value
247+" vim: set fdm=marker fileformat=unix: