├── screenshots
├── dark_256.png
├── dark_gui.png
├── light_256.png
└── light_gui.png
├── ci
├── dark_256.vim
├── dark_gui.vim
├── light_256.vim
├── light_gui.vim
├── init.vim
├── generate.sh
└── vimcolors.rb
├── LICENSE.txt
├── .travis.yml
├── .circleci
└── config.yml
├── README.md
└── colors
└── open-color.vim
/screenshots/dark_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yous/vim-open-color/HEAD/screenshots/dark_256.png
--------------------------------------------------------------------------------
/screenshots/dark_gui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yous/vim-open-color/HEAD/screenshots/dark_gui.png
--------------------------------------------------------------------------------
/screenshots/light_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yous/vim-open-color/HEAD/screenshots/light_256.png
--------------------------------------------------------------------------------
/screenshots/light_gui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yous/vim-open-color/HEAD/screenshots/light_gui.png
--------------------------------------------------------------------------------
/ci/dark_256.vim:
--------------------------------------------------------------------------------
1 | set background=dark
2 | colorscheme open-color
3 |
4 | TOhtml
5 | w! dist/dark_256.html
6 | qall!
7 |
--------------------------------------------------------------------------------
/ci/dark_gui.vim:
--------------------------------------------------------------------------------
1 | set background=dark
2 | colorscheme open-color
3 |
4 | TOhtml
5 | w! dist/dark_gui.html
6 | qall!
7 |
--------------------------------------------------------------------------------
/ci/light_256.vim:
--------------------------------------------------------------------------------
1 | set background=light
2 | colorscheme open-color
3 |
4 | TOhtml
5 | w! dist/light_256.html
6 | qall!
7 |
--------------------------------------------------------------------------------
/ci/light_gui.vim:
--------------------------------------------------------------------------------
1 | set background=light
2 | colorscheme open-color
3 |
4 | TOhtml
5 | w! dist/light_gui.html
6 | qall!
7 |
--------------------------------------------------------------------------------
/ci/init.vim:
--------------------------------------------------------------------------------
1 | set nocompatible
2 | filetype plugin indent on
3 | syntax on
4 | set runtimepath^=.
5 |
6 | let g:html_no_progress = 1
7 | let g:html_number_lines = 1
8 |
--------------------------------------------------------------------------------
/ci/generate.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -euxo pipefail
3 |
4 | "$1" -V1 -f -T xterm-256color -E -n -u ci/init.vim -S ci/"$2".vim ci/vimcolors.rb
5 | sleep 3
6 | [ -e dist/"$2".html ]
7 |
--------------------------------------------------------------------------------
/ci/vimcolors.rb:
--------------------------------------------------------------------------------
1 | require 'active_support'
2 |
3 | module VimColors
4 | class RubyExample
5 | CONSTANT = /^[0-9]+ regex awesomes$/
6 |
7 | attr_reader :colorscheme
8 |
9 | # TODO: Bacon ipsum dolor sit amet
10 | def initialize(attributes = {})
11 | @colorscheme = attributes[:colorscheme]
12 | end
13 |
14 | def self.examples
15 | # TODO
16 | # Bacon ipsum dolor sit amet
17 | ['string', :symbol, true, false, nil, 99.9, 1..2].each do |value|
18 | puts "it appears that #{value.inspect} is a #{value.class}"
19 | end
20 |
21 | {:key1 => :value1, key2: 'value2'}.each do |key, value|
22 | puts "the #{key.inspect} key has a value of #{value.inspect}"
23 | end
24 |
25 | %w[One Two Three].each { |number| puts number }
26 | end
27 |
28 | private
29 |
30 | def heredoc_example
31 | <<-SQL
32 | SELECT *
33 | FROM colorschemes
34 | WHERE background = 'dark'
35 | SQL
36 | end
37 | end
38 | end
39 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016-2025 Chayoung You
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: python
2 | dist: xenial
3 | python: 3.8
4 | addons:
5 | apt:
6 | packages:
7 | - vim-gtk
8 | - xvfb
9 | install:
10 | - pip install vim-vint
11 | before_script:
12 | - |
13 | export DISPLAY=:99.0
14 | /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x24
15 | - mkdir -p dist
16 | - vim --version
17 | script:
18 | - vint colors/
19 | - gvim -T xterm-256color -E -n -u ci/init.vim -S ci/dark_gui.vim ci/vimcolors.rb >/dev/null && sleep 3 && [ -e dist/dark_gui.html ]
20 | - gvim -T xterm-256color -E -n -u ci/init.vim -S ci/light_gui.vim ci/vimcolors.rb >/dev/null && sleep 3 && [ -e dist/light_gui.html ]
21 | - vim -T xterm-256color -E -n -u ci/init.vim -S ci/dark_256.vim ci/vimcolors.rb >/dev/null && [ -e dist/dark_256.html ]
22 | - vim -T xterm-256color -E -n -u ci/init.vim -S ci/light_256.vim ci/vimcolors.rb >/dev/null && [ -e dist/light_256.html ]
23 | branches:
24 | only:
25 | - master
26 | deploy:
27 | provider: pages
28 | skip_cleanup: true
29 | github_token: $GITHUB_TOKEN
30 | keep_history: true
31 | local_dir: dist
32 | target_branch: gh-pages
33 | on:
34 | branch: master
35 |
--------------------------------------------------------------------------------
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | version: 2.1
2 |
3 | jobs:
4 | lint:
5 | docker:
6 | - image: cimg/python:3.13
7 | steps:
8 | - checkout
9 | - run: pip install -U vim-vint
10 | - run: vint colors/
11 | build:
12 | machine:
13 | image: ubuntu-2404:current
14 | steps:
15 | - checkout
16 | - run: sudo apt-get update && sudo apt-get install -y --no-install-recommends vim-gtk3
17 | - run:
18 | name: Generate previews
19 | command: |
20 | mkdir -p dist
21 | ci/generate.sh gvim dark_gui
22 | ci/generate.sh gvim light_gui
23 | ci/generate.sh vim dark_256
24 | ci/generate.sh vim light_256
25 | - store_artifacts:
26 | path: dist
27 | - persist_to_workspace:
28 | root: .
29 | paths:
30 | - dist
31 | deploy:
32 | docker:
33 | - image: cimg/node:22.14
34 | environment:
35 | NPM_CONFIG_PREFIX: "~/.npm-global"
36 | steps:
37 | - checkout
38 | - run: echo 'export PATH=~/.npm-global/bin:$PATH' >> $BASH_ENV
39 | - restore_cache:
40 | keys:
41 | - npm-{{ arch }}
42 | - run: npm install -g gh-pages
43 | - save_cache:
44 | key: npm-{{ arch }}
45 | paths:
46 | - ~/.npm
47 | - ~/.npm-global
48 | - attach_workspace:
49 | at: .
50 | - run: |
51 | git config user.name "$(git --no-pager show --no-patch --format='%an')"
52 | git config user.email "$(git --no-pager show --no-patch --format='%ae')"
53 | - add_ssh_keys:
54 | fingerprints:
55 | - "uQFw4yrd8TZKe6rsAFpqfc6wbNRLUk7C+2tb6jK8A4M"
56 | - run:
57 | command: gh-pages --branch gh-pages --dist dist --message "Update to ${CIRCLE_SHA1:0:7} [ci skip]"
58 | environment:
59 | CACHE_DIR: "~/.npm-global/.cache"
60 |
61 | workflows:
62 | version: 2
63 | ci:
64 | jobs:
65 | - lint
66 | - build:
67 | requires:
68 | - lint
69 | - deploy:
70 | requires:
71 | - build
72 | filters:
73 | branches:
74 | only: master
75 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # open-color.vim
2 |
3 | [](https://circleci.com/gh/yous/vim-open-color/tree/master)
4 |
5 | Vim color scheme using [Open Color](https://yeun.github.io/open-color/).
6 | Conversion from original colors to 256 colors has done according to
7 | [CIEDE2000](https://en.wikipedia.org/wiki/Color_difference). See
8 | [the implementation](https://gist.github.com/yous/6907d5ee01c237b9849ab005a13cf621).
9 |
10 | ## Demo
11 |
12 | The previews are generated based on the latest master branch.
13 |
14 | - [Dark GUI](https://yous.github.io/vim-open-color/dark_gui.html)
15 | - [Light GUI](https://yous.github.io/vim-open-color/light_gui.html)
16 | - [Dark 256 colors](https://yous.github.io/vim-open-color/dark_256.html)
17 | - [Light 256 colors](https://yous.github.io/vim-open-color/light_256.html)
18 |
19 | ## Screenshots (before v2.3.0)
20 |
21 | ### GUI
22 |
23 |
24 |
25 |
26 | ### 256-color
27 |
28 |
29 |
30 |
31 | ## Installation
32 |
33 | - [Pathogen](https://github.com/tpope/vim-pathogen)
34 | 1. `cd ~/.vim/bundle`
35 | 2. `git clone https://github.com/yous/vim-open-color.git`
36 | - [Vundle](https://github.com/VundleVim/Vundle.vim)
37 | 1. Add `Plugin 'yous/vim-open-color'` to `.vimrc`
38 | 2. Run `:PluginInstall`
39 | - [NeoBundle](https://github.com/Shougo/neobundle.vim)
40 | 1. Add `NeoBundle 'yous/vim-open-color'` to `.vimrc`
41 | 2. Run `:NeoBundleInstall`
42 | - [vim-plug](https://github.com/junegunn/vim-plug)
43 | 1. Add `Plug 'yous/vim-open-color'` to `.vimrc`
44 | 2. Run `:PlugInstall`
45 |
46 | ## Usage
47 |
48 | 1. Check your terminal.
49 | - If your terminal emulator [supports true colors](https://gist.github.com/XVilka/8346728),
50 | add the following lines to your `.vimrc`.
51 |
52 | ``` vim
53 | " Use 24-bit (true-color) mode in Vim/Neovim when outside tmux or screen.
54 | " If you're using tmux version 2.2 or later, you can remove the outermost $TMUX
55 | " check and use tmux's 24-bit color support
56 | " (http://sunaku.github.io/tmux-24bit-color.html#usage for more information.)
57 | if empty($TMUX) && empty($STY)
58 | " See https://gist.github.com/XVilka/8346728.
59 | if $COLORTERM =~# 'truecolor' || $COLORTERM =~# '24bit'
60 | if has('termguicolors')
61 | " See :help xterm-true-color
62 | if $TERM =~# '^screen'
63 | let &t_8f = "\[38;2;%lu;%lu;%lum"
64 | let &t_8b = "\[48;2;%lu;%lu;%lum"
65 | endif
66 | set termguicolors
67 | endif
68 | endif
69 | endif
70 | ```
71 | - To use 256-color mode, set your `$TERM` as `*-256color` or add
72 | `set t_Co=256` in your `.vimrc`.
73 | 2. Enable open-color color scheme:
74 |
75 | ``` vim
76 | colorscheme open-color
77 | ```
78 |
79 | ## License
80 |
81 | Copyright © Chayoung You. See [LICENSE.txt](LICENSE.txt) for details.
82 |
--------------------------------------------------------------------------------
/colors/open-color.vim:
--------------------------------------------------------------------------------
1 | " Vim color scheme using Open Color
2 | " (https://yeun.github.io/open-color/)
3 | " Maintainer: Chayoung You
4 | " URL: https://github.com/yous/vim-open-color
5 | " Version: 2.10.0
6 | " License: The MIT License (MIT)
7 |
8 | let s:save_cpo = &cpoptions
9 | set cpoptions&vim
10 |
11 | let s:background = &background
12 |
13 | function! s:Hi(item, fg, bg, ...)
14 | if empty(a:fg) && empty(a:bg) && a:0 == 0
15 | return
16 | endif
17 | let l:hi = printf('highlight %s', a:item)
18 | if !empty(a:fg)
19 | if type(a:fg) == type('')
20 | let l:fg_gui = a:fg
21 | let l:fg_256 = a:fg
22 | else
23 | let l:fg_gui = a:fg[0]
24 | let l:fg_256 = a:fg[1]
25 | endif
26 | let l:hi = printf('%s ctermfg=%s guifg=%s', l:hi, l:fg_256, l:fg_gui)
27 | endif
28 | if !empty(a:bg)
29 | if type(a:bg) == type('')
30 | let l:bg_gui = a:bg
31 | let l:bg_256 = a:bg
32 | else
33 | let l:bg_gui = a:bg[0]
34 | let l:bg_256 = a:bg[1]
35 | endif
36 | let l:hi = printf('%s ctermbg=%s guibg=%s', l:hi, l:bg_256, l:bg_gui)
37 | endif
38 | if a:0 > 0
39 | let l:hi .= printf(' cterm=%s gui=%s', a:1, a:1)
40 | endif
41 | execute l:hi
42 | endfunction
43 |
44 | if !exists('s:oc')
45 | let s:oc = {}
46 | let s:oc['gray'] = [
47 | \ ['#f8f9fa', 15], ['#f1f3f5', 255], ['#e9ecef', 255],
48 | \ ['#dee2e6', 254], ['#ced4da', 252], ['#adb5bd', 249],
49 | \ ['#868e96', 245], ['#495057', 239], ['#343a40', 237],
50 | \ ['#212529', 235]]
51 | let s:oc['red'] = [
52 | \ ['#fff5f5', 15], ['#ffe3e3', 224], ['#ffc9c9', 224],
53 | \ ['#ffa8a8', 217], ['#ff8787', 210], ['#ff6b6b', 203],
54 | \ ['#fa5252', 203], ['#f03e3e', 167], ['#e03131', 160],
55 | \ ['#c92a2a', 160]]
56 | let s:oc['pink'] = [
57 | \ ['#fff0f6', 255], ['#ffdeeb', 224], ['#fcc2d7', 218],
58 | \ ['#faa2c1', 218], ['#f783ac', 211], ['#f06595', 204],
59 | \ ['#e64980', 168], ['#d6336c', 161], ['#c2255c', 161],
60 | \ ['#a61e4d', 125]]
61 | let s:oc['grape'] = [
62 | \ ['#f8f0fc', 255], ['#f3d9fa', 225], ['#eebefa', 219],
63 | \ ['#e599f7', 213], ['#da77f2', 177], ['#cc5de8', 171],
64 | \ ['#be4bdb', 134], ['#ae3ec9', 128], ['#9c36b5', 127],
65 | \ ['#862e9c', 91]]
66 | let s:oc['violet'] = [
67 | \ ['#f3f0ff', 255], ['#e5dbff', 189], ['#d0bfff', 183],
68 | \ ['#b197fc', 141], ['#9775fa', 141], ['#845ef7', 99],
69 | \ ['#7950f2', 99], ['#7048e8', 62], ['#6741d9', 57],
70 | \ ['#5f3dc4', 56]]
71 | let s:oc['indigo'] = [
72 | \ ['#edf2ff', 255], ['#dbe4ff', 189], ['#bac8ff', 147],
73 | \ ['#91a7ff', 111], ['#748ffc', 69], ['#5c7cfa', 69],
74 | \ ['#4c6ef5', 27], ['#4263eb', 27], ['#3b5bdb', 27],
75 | \ ['#364fc7', 26]]
76 | let s:oc['blue'] = [
77 | \ ['#e7f5ff', 255], ['#d0ebff', 153], ['#a5d8ff', 153],
78 | \ ['#74c0fc', 75], ['#4dabf7', 75], ['#339af0', 75],
79 | \ ['#228be6', 32], ['#1c7ed6', 32], ['#1971c2', 25],
80 | \ ['#1864ab', 25]]
81 | let s:oc['cyan'] = [
82 | \ ['#e3fafc', 195], ['#c5f6fa', 195], ['#99e9f2', 116],
83 | \ ['#66d9e8', 80], ['#3bc9db', 45], ['#22b8cf', 38],
84 | \ ['#15aabf', 38], ['#1098ad', 31], ['#0c8599', 31],
85 | \ ['#0b7285', 6]]
86 | let s:oc['teal'] = [
87 | \ ['#e6fcf5', 195], ['#c3fae8', 158], ['#96f2d7', 122],
88 | \ ['#63e6be', 79], ['#38d9a9', 43], ['#20c997', 43],
89 | \ ['#12b886', 36], ['#0ca678', 36], ['#099268', 29],
90 | \ ['#087f5b', 29]]
91 | let s:oc['green'] = [
92 | \ ['#ebfbee', 195], ['#d3f9d8', 194], ['#b2f2bb', 157],
93 | \ ['#8ce99a', 114], ['#69db7c', 78], ['#51cf66', 77],
94 | \ ['#40c057', 71], ['#37b24d', 71], ['#2f9e44', 35],
95 | \ ['#2b8a3e', 28]]
96 | let s:oc['lime'] = [
97 | \ ['#f4fce3', 230], ['#e9fac8', 230], ['#d8f5a2', 193],
98 | \ ['#c0eb75', 192], ['#a9e34b', 149], ['#94d82d', 112],
99 | \ ['#82c91e', 112], ['#74b816', 70], ['#66a80f', 70],
100 | \ ['#5c940d', 64]]
101 | let s:oc['yellow'] = [
102 | \ ['#fff9db', 230], ['#fff3bf', 230], ['#ffec99', 229],
103 | \ ['#ffe066', 221], ['#ffd43b', 220], ['#fcc419', 220],
104 | \ ['#fab005', 214], ['#f59f00', 214], ['#f08c00', 208],
105 | \ ['#e67700', 208]]
106 | let s:oc['orange'] = [
107 | \ ['#fff4e6', 255], ['#ffe8cc', 223], ['#ffd8a8', 223],
108 | \ ['#ffc078', 215], ['#ffa94d', 215], ['#ff922b', 208],
109 | \ ['#fd7e14', 208], ['#f76707', 202], ['#e8590c', 166],
110 | \ ['#d9480f', 166]]
111 | endif
112 |
113 | highlight clear
114 | if exists('g:syntax_on')
115 | syntax reset
116 | endif
117 |
118 | if has('gui_running') || &t_Co == 88 || &t_Co == 256
119 | if s:background ==# 'dark'
120 | " :help group-name
121 | " :help highlight-groups
122 | call s:Hi('Normal', s:oc['gray'][2], s:oc['gray'][9])
123 | call s:Hi('NormalFloat', s:oc['gray'][2], s:oc['gray'][8])
124 | call s:Hi('LineNr', s:oc['gray'][6], '')
125 | call s:Hi('Visual', '', s:oc['gray'][8])
126 | call s:Hi('VisualNOS', '', s:oc['gray'][8], 'NONE')
127 |
128 | " Comment
129 | call s:Hi('Comment', s:oc['gray'][6], '')
130 |
131 | " Constant
132 | call s:Hi('Constant', s:oc['yellow'][4], '')
133 | call s:Hi('String', s:oc['lime'][4], '')
134 | call s:Hi('Character', s:oc['orange'][4], '')
135 | call s:Hi('Number', s:oc['orange'][4], '')
136 | call s:Hi('Boolean', s:oc['orange'][4], '')
137 | call s:Hi('Float', s:oc['orange'][4], '')
138 |
139 | " Identifier
140 | call s:Hi('Identifier', s:oc['yellow'][2], '', 'bold')
141 | call s:Hi('Function', s:oc['yellow'][2], '', 'bold')
142 |
143 | " Statement
144 | call s:Hi('Statement', s:oc['violet'][2], '', 'NONE')
145 | call s:Hi('Conditional', s:oc['indigo'][3], '')
146 | call s:Hi('Repeat', s:oc['indigo'][3], '')
147 | call s:Hi('Operator', s:oc['cyan'][2], '')
148 |
149 | " PreProc
150 | call s:Hi('PreProc', s:oc['violet'][2], '')
151 |
152 | " Type
153 | call s:Hi('Type', s:oc['cyan'][2], '', 'NONE')
154 |
155 | " Special
156 | call s:Hi('Special', s:oc['yellow'][2], '')
157 |
158 | " Underlined
159 | call s:Hi('Underlined', s:oc['cyan'][2], '')
160 |
161 | " Error
162 | call s:Hi('Error', s:oc['gray'][2], s:oc['red'][7])
163 |
164 | " Todo
165 | call s:Hi('Todo', s:oc['gray'][2], s:oc['lime'][9])
166 |
167 | " set textwidth=80 colorcolumn+=1
168 | call s:Hi('ColorColumn', '', s:oc['gray'][8], 'NONE')
169 |
170 | call s:Hi('Cursor', s:oc['gray'][9], s:oc['gray'][2])
171 |
172 | " set cursorline
173 | call s:Hi('CursorLine', '', s:oc['gray'][8], 'NONE')
174 | call s:Hi('CursorLineNr', s:oc['yellow'][2], s:oc['gray'][8], 'bold')
175 | " set cursorcolumn
176 | call s:Hi('CursorColumn', '', s:oc['gray'][8])
177 |
178 | call s:Hi('Directory', s:oc['indigo'][3], '')
179 |
180 | call s:Hi('DiffAdd', 'NONE', s:oc['green'][9])
181 | call s:Hi('DiffDelete', s:oc['gray'][9], s:oc['red'][5])
182 | call s:Hi('DiffChange', 'NONE', s:oc['blue'][9])
183 | call s:Hi('DiffText', 'NONE', s:oc['violet'][9])
184 | call s:Hi('diffAdded', s:oc['lime'][4], '')
185 | call s:Hi('diffRemoved', s:oc['red'][5], '')
186 |
187 | call s:Hi('VertSplit', s:oc['gray'][6], s:oc['gray'][8], 'NONE')
188 | call s:Hi('WinSeparator', s:oc['gray'][6], s:oc['gray'][9])
189 |
190 | call s:Hi('Folded', s:oc['gray'][6], s:oc['gray'][9])
191 | " set foldcolumn=1
192 | call s:Hi('FoldColumn', s:oc['gray'][6], s:oc['gray'][9])
193 | " :help signs
194 | call s:Hi('SignColumn', s:oc['gray'][8], 'NONE')
195 | call s:Hi('MatchParen', '', s:oc['gray'][6], 'NONE')
196 |
197 | " :help error-messages
198 | call s:Hi('ErrorMsg', s:oc['gray'][2], s:oc['red'][7])
199 | " -- INSERT --
200 | call s:Hi('ModeMsg', s:oc['gray'][2], '')
201 | " -- More --
202 | call s:Hi('MoreMsg', s:oc['lime'][4], '')
203 | " Press ENTER or type command to continue
204 | call s:Hi('Question', s:oc['lime'][4], '')
205 | " Search hit bottom
206 | call s:Hi('WarningMsg', s:oc['red'][5], '')
207 |
208 | " let &showbreak = '> '
209 | call s:Hi('NonText', s:oc['gray'][6], '')
210 |
211 | " Popup menu
212 | call s:Hi('Pmenu', s:oc['gray'][2], s:oc['gray'][8], 'NONE')
213 | call s:Hi('PmenuSel', s:oc['gray'][2], s:oc['gray'][6], 'NONE')
214 | call s:Hi('PmenuSbar', '', s:oc['gray'][6])
215 | call s:Hi('PmenuThumb', '', s:oc['gray'][2])
216 |
217 | call s:Hi('QuickFixLine', s:oc['gray'][9], s:oc['yellow'][2])
218 | call s:Hi('Search', s:oc['gray'][9], s:oc['yellow'][2])
219 | call s:Hi('CurSearch', 'NONE', 'NONE', 'reverse')
220 | call s:Hi('IncSearch', 'NONE', 'NONE', 'reverse')
221 |
222 | " :map, listchars
223 | call s:Hi('SpecialKey', s:oc['gray'][6], '')
224 |
225 | call s:Hi('StatusLine', s:oc['lime'][4], s:oc['gray'][8], 'NONE')
226 | call s:Hi('StatusLineNC', s:oc['gray'][6], s:oc['gray'][8], 'NONE')
227 | call s:Hi('TabLineFill', '', s:oc['gray'][8], 'NONE')
228 | call s:Hi('TabLineSel', s:oc['gray'][2], s:oc['gray'][6], 'NONE')
229 | call s:Hi('TabLine', s:oc['gray'][6], s:oc['gray'][8], 'NONE')
230 | call s:Hi('WildMenu', s:oc['gray'][9], s:oc['lime'][4])
231 |
232 | " winbar
233 | call s:Hi('WinBar', s:oc['indigo'][3], s:oc['gray'][9], 'bold')
234 | call s:Hi('WinBarNC', s:oc['gray'][6], s:oc['gray'][9], 'NONE')
235 |
236 | " :set all
237 | call s:Hi('Title', s:oc['indigo'][3], '', 'bold')
238 |
239 | " :set conceallevel=1
240 | call s:Hi('Conceal', s:oc['gray'][2], s:oc['gray'][8])
241 | call s:Hi('Ignore', s:oc['gray'][6], s:oc['gray'][9])
242 |
243 | " syntax/ruby.vim
244 | " ARGV, $stdout
245 | call s:Hi('rubyPredefinedIdentifier', s:oc['red'][5], '')
246 |
247 | " vim-gitgutter
248 | call s:Hi('GitGutterAdd', s:oc['lime'][4], '')
249 | call s:Hi('GitGutterChange', s:oc['yellow'][2], '')
250 | call s:Hi('GitGutterDelete', s:oc['red'][5], '')
251 | call s:Hi('GitGutterChangeDelete', s:oc['yellow'][2], '')
252 |
253 | " vim-signify
254 | call s:Hi('SignifySignAdd', s:oc['lime'][4], '')
255 | call s:Hi('SignifySignChange', s:oc['yellow'][2], '')
256 | call s:Hi('SignifySignDelete', s:oc['red'][5], '')
257 |
258 | " Terminal colors
259 | if has('nvim')
260 | let g:terminal_color_0 = s:oc['gray'][9][0]
261 | let g:terminal_color_1 = s:oc['red'][5][0]
262 | let g:terminal_color_2 = s:oc['lime'][4][0]
263 | let g:terminal_color_3 = s:oc['yellow'][4][0]
264 | let g:terminal_color_4 = s:oc['indigo'][4][0]
265 | let g:terminal_color_5 = s:oc['violet'][3][0]
266 | let g:terminal_color_6 = s:oc['cyan'][2][0]
267 | let g:terminal_color_7 = s:oc['gray'][5][0]
268 | let g:terminal_color_8 = s:oc['gray'][7][0]
269 | let g:terminal_color_9 = s:oc['red'][3][0]
270 | let g:terminal_color_10 = s:oc['lime'][2][0]
271 | let g:terminal_color_11 = s:oc['yellow'][2][0]
272 | let g:terminal_color_12 = s:oc['indigo'][2][0]
273 | let g:terminal_color_13 = s:oc['violet'][1][0]
274 | let g:terminal_color_14 = s:oc['cyan'][1][0]
275 | let g:terminal_color_15 = s:oc['gray'][2][0]
276 | else
277 | let g:terminal_ansi_colors = [
278 | \ s:oc['gray'][9][0], s:oc['red'][5][0],
279 | \ s:oc['lime'][4][0], s:oc['yellow'][4][0],
280 | \ s:oc['indigo'][4][0], s:oc['violet'][3][0],
281 | \ s:oc['cyan'][2][0], s:oc['gray'][5][0],
282 | \ s:oc['gray'][7][0], s:oc['red'][3][0],
283 | \ s:oc['lime'][2][0], s:oc['yellow'][2][0],
284 | \ s:oc['indigo'][2][0], s:oc['violet'][1][0],
285 | \ s:oc['cyan'][1][0], s:oc['gray'][2][0]]
286 | endif
287 | else
288 | " :help group-name
289 | " :help highlight-groups
290 | call s:Hi('Normal', s:oc['gray'][8], s:oc['gray'][1])
291 | call s:Hi('NormalFloat', s:oc['gray'][8], s:oc['gray'][3])
292 | call s:Hi('LineNr', s:oc['gray'][6], '')
293 | call s:Hi('Visual', '', s:oc['gray'][4])
294 | call s:Hi('VisualNOS', '', s:oc['gray'][4], 'NONE')
295 |
296 | " Comment
297 | call s:Hi('Comment', s:oc['gray'][6], '')
298 |
299 | " Constant
300 | call s:Hi('Constant', s:oc['pink'][6], '')
301 | call s:Hi('String', s:oc['lime'][8], '')
302 | call s:Hi('Character', s:oc['orange'][8], '')
303 | call s:Hi('Number', s:oc['orange'][8], '')
304 | call s:Hi('Boolean', s:oc['orange'][8], '')
305 | call s:Hi('Float', s:oc['orange'][8], '')
306 |
307 | " Identifier
308 | call s:Hi('Identifier', s:oc['yellow'][7], '', 'bold')
309 | call s:Hi('Function', s:oc['yellow'][7], '', 'bold')
310 |
311 | " Statement
312 | call s:Hi('Statement', s:oc['violet'][6], '', 'NONE')
313 | call s:Hi('Conditional', s:oc['indigo'][5], '')
314 | call s:Hi('Repeat', s:oc['indigo'][5], '')
315 | call s:Hi('Operator', s:oc['cyan'][5], '')
316 |
317 | " PreProc
318 | call s:Hi('PreProc', s:oc['violet'][6], '')
319 |
320 | " Type
321 | call s:Hi('Type', s:oc['cyan'][5], '', 'NONE')
322 |
323 | " Special
324 | call s:Hi('Special', s:oc['yellow'][7], '')
325 |
326 | " Underlined
327 | call s:Hi('Underlined', s:oc['cyan'][5], '')
328 |
329 | " Error
330 | call s:Hi('Error', s:oc['gray'][8], s:oc['red'][5])
331 |
332 | " Todo
333 | call s:Hi('Todo', s:oc['gray'][9], s:oc['lime'][4])
334 |
335 | " set textwidth=80 colorcolumn+=1
336 | call s:Hi('ColorColumn', '', s:oc['gray'][0], 'NONE')
337 |
338 | call s:Hi('Cursor', s:oc['gray'][1], s:oc['gray'][5])
339 |
340 | " set cursorline
341 | call s:Hi('CursorLine', '', s:oc['gray'][0], 'NONE')
342 | call s:Hi('CursorLineNr', s:oc['yellow'][7], s:oc['gray'][0], 'bold')
343 | " set cursorcolumn
344 | call s:Hi('CursorColumn', '', s:oc['gray'][0])
345 |
346 | call s:Hi('Directory', s:oc['indigo'][5], '')
347 |
348 | call s:Hi('DiffAdd', 'NONE', s:oc['lime'][3])
349 | call s:Hi('DiffDelete', s:oc['gray'][1], s:oc['red'][5])
350 | call s:Hi('DiffChange', 'NONE', s:oc['indigo'][1])
351 | call s:Hi('DiffText', 'NONE', s:oc['cyan'][1])
352 | call s:Hi('diffAdded', s:oc['lime'][8], '')
353 | call s:Hi('diffRemoved', s:oc['red'][5], '')
354 |
355 | call s:Hi('VertSplit', s:oc['gray'][6], s:oc['gray'][3], 'NONE')
356 | call s:Hi('WinSeparator', s:oc['gray'][6], s:oc['gray'][1])
357 |
358 | call s:Hi('Folded', s:oc['gray'][6], s:oc['gray'][1])
359 | " set foldcolumn=1
360 | call s:Hi('FoldColumn', s:oc['gray'][6], s:oc['gray'][1])
361 | " :help signs
362 | call s:Hi('SignColumn', s:oc['gray'][2], 'NONE')
363 | call s:Hi('MatchParen', '', s:oc['gray'][3], 'NONE')
364 |
365 | " :help error-messages
366 | call s:Hi('ErrorMsg', s:oc['gray'][8], s:oc['red'][5])
367 | " -- INSERT --
368 | call s:Hi('ModeMsg', s:oc['gray'][8], '')
369 | " -- More --
370 | call s:Hi('MoreMsg', s:oc['lime'][8], '')
371 | " Press ENTER or type command to continue
372 | call s:Hi('Question', s:oc['lime'][8], '')
373 | " Search hit bottom
374 | call s:Hi('WarningMsg', s:oc['red'][7], '')
375 |
376 | " let &showbreak = '> '
377 | call s:Hi('NonText', s:oc['gray'][6], '')
378 |
379 | " Popup menu
380 | call s:Hi('Pmenu', s:oc['gray'][8], s:oc['gray'][3], 'NONE')
381 | call s:Hi('PmenuSel', s:oc['gray'][8], s:oc['gray'][4], 'NONE')
382 | call s:Hi('PmenuSbar', '', s:oc['gray'][4])
383 | call s:Hi('PmenuThumb', '', s:oc['gray'][8])
384 |
385 | call s:Hi('QuickFixLine', s:oc['gray'][9], s:oc['yellow'][3])
386 | call s:Hi('Search', s:oc['gray'][9], s:oc['yellow'][3])
387 | call s:Hi('CurSearch', 'NONE', 'NONE', 'reverse')
388 | call s:Hi('IncSearch', 'NONE', 'NONE', 'reverse')
389 |
390 | " :map, listchars
391 | call s:Hi('SpecialKey', s:oc['gray'][6], '')
392 |
393 | call s:Hi('StatusLine', s:oc['lime'][8], s:oc['gray'][3], 'NONE')
394 | call s:Hi('StatusLineNC', s:oc['gray'][6], s:oc['gray'][3], 'NONE')
395 | call s:Hi('TabLineFill', '', s:oc['gray'][2], 'NONE')
396 | call s:Hi('TabLineSel', s:oc['gray'][8], s:oc['gray'][4], 'NONE')
397 | call s:Hi('TabLine', s:oc['gray'][6], s:oc['gray'][2], 'NONE')
398 | call s:Hi('WildMenu', s:oc['gray'][1], s:oc['lime'][8])
399 |
400 | " winbar
401 | call s:Hi('WinBar', s:oc['indigo'][5], s:oc['gray'][1], 'bold')
402 | call s:Hi('WinBarNC', s:oc['gray'][6], s:oc['gray'][1], 'NONE')
403 |
404 | " :set all
405 | call s:Hi('Title', s:oc['indigo'][5], '', 'bold')
406 |
407 | " :set conceallevel=1
408 | call s:Hi('Conceal', s:oc['gray'][8], s:oc['gray'][3])
409 | call s:Hi('Ignore', s:oc['gray'][6], s:oc['gray'][1])
410 |
411 | " syntax/ruby.vim
412 | " ARGV, $stdout
413 | call s:Hi('rubyPredefinedIdentifier', s:oc['red'][7], '')
414 |
415 | " vim-gitgutter
416 | call s:Hi('GitGutterAdd', s:oc['lime'][8], '')
417 | call s:Hi('GitGutterChange', s:oc['yellow'][7], '')
418 | call s:Hi('GitGutterDelete', s:oc['red'][7], '')
419 | call s:Hi('GitGutterChangeDelete', s:oc['yellow'][7], '')
420 |
421 | " vim-signify
422 | call s:Hi('SignifySignAdd', s:oc['lime'][8], '')
423 | call s:Hi('SignifySignChange', s:oc['yellow'][7], '')
424 | call s:Hi('SignifySignDelete', s:oc['red'][7], '')
425 |
426 | " Terminal colors
427 | if has('nvim')
428 | let g:terminal_color_0 = s:oc['gray'][9][0]
429 | let g:terminal_color_1 = s:oc['red'][7][0]
430 | let g:terminal_color_2 = s:oc['lime'][8][0]
431 | let g:terminal_color_3 = s:oc['yellow'][7][0]
432 | let g:terminal_color_4 = s:oc['indigo'][5][0]
433 | let g:terminal_color_5 = s:oc['violet'][6][0]
434 | let g:terminal_color_6 = s:oc['cyan'][4][0]
435 | let g:terminal_color_7 = s:oc['gray'][5][0]
436 | let g:terminal_color_8 = s:oc['gray'][7][0]
437 | let g:terminal_color_9 = s:oc['red'][5][0]
438 | let g:terminal_color_10 = s:oc['lime'][5][0]
439 | let g:terminal_color_11 = s:oc['yellow'][5][0]
440 | let g:terminal_color_12 = s:oc['indigo'][3][0]
441 | let g:terminal_color_13 = s:oc['violet'][3][0]
442 | let g:terminal_color_14 = s:oc['cyan'][2][0]
443 | let g:terminal_color_15 = s:oc['gray'][2][0]
444 | else
445 | let g:terminal_ansi_colors = [
446 | \ s:oc['gray'][9][0], s:oc['red'][7][0],
447 | \ s:oc['lime'][8][0], s:oc['yellow'][7][0],
448 | \ s:oc['indigo'][5][0], s:oc['violet'][6][0],
449 | \ s:oc['cyan'][4][0], s:oc['gray'][5][0],
450 | \ s:oc['gray'][7][0], s:oc['red'][5][0],
451 | \ s:oc['lime'][5][0], s:oc['yellow'][5][0],
452 | \ s:oc['indigo'][3][0], s:oc['violet'][3][0],
453 | \ s:oc['cyan'][2][0], s:oc['gray'][2][0]]
454 | endif
455 | endif
456 | endif
457 |
458 | let g:colors_name = 'open-color'
459 | let &background = s:background
460 |
461 | let &cpoptions = s:save_cpo
462 | unlet s:save_cpo
463 |
--------------------------------------------------------------------------------