diff --git a/README.md b/README.md index c91ce82..4ba7552 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,33 @@ # vim-code-dark `vim-code-dark` is a dark **color scheme for [Vim](http://www.vim.org/)** heavily inspired by the look of the Dark+ scheme of [Visual Studio Code](https://code.visualstudio.com/). While many of the colors are same, there are additional colors for specific usage or reserved for future use. The scheme also defines specific GUI colors (e.g. popup menu) and fully supports [`vim-airline`](https://github.com/vim-airline/vim-airline). +**:exclamation: To install and enable this colorscheme, [read installation instructions](#installation).** + +*This colorscheme does also support 256 and 8/16 color terminals. See [installation instructions](#installation) step 3.* + ## Screenshots +### gVim *(full support)* ![Ruby and NERDTree](https://cloud.githubusercontent.com/assets/10374559/23333137/b86efaa0-fb86-11e6-8c06-813f81c1f9bb.png) ![Editing HTML](https://cloud.githubusercontent.com/assets/10374559/23333136/b86b472a-fb86-11e6-8147-da61bc29e8b5.png) *Code samples [1](http://sandbox.mc.edu/~bennet/ruby/code/), [2](https://tmtheme-editor.herokuapp.com/), [`nerdtree`](https://github.com/scrooloose/nerdtree)* +### 256-color terminals *(nearest available colors)* +![Terminal on Debian with 256 colors](https://cloud.githubusercontent.com/assets/10374559/23342967/e61e28c6-fc63-11e6-9ccf-d6189b9e1b61.png) + +### 8/16-color terminals *(partial support)* +![Terminal on Debian with 16 colors](https://cloud.githubusercontent.com/assets/10374559/23341713/0e8dd778-fc4d-11e6-8430-b11f161305d7.png) + ## Color Palette -![Color Palette](https://cloud.githubusercontent.com/assets/10374559/23146186/d005f732-f7d4-11e6-89fe-c27b0347702e.png) +![Color Palette](https://cloud.githubusercontent.com/assets/10374559/23341312/1961f416-fc45-11e6-83ba-d7180c5fdd6d.png) -## Questions & Answers +## Installation -### How to install? -Simply as all other Vim plugins following the standard procedure of your plugin manager / manually. +### 1) Download + +Simply as any other Vim plugins: download manually or follow the standard procedure of your plugin manager: * [Vundle](https://github.com/gmarik/vundle) * `Plugin 'tomasiser/vim-code-dark'` * [vim-plug](https://github.com/junegunn/vim-plug) @@ -23,19 +35,71 @@ Simply as all other Vim plugins following the standard procedure of your plugin * manual * copy all of the files to `~/.vim` (or `$HOME\vimfiles` on Windows) directory -### How to activate? -You can add the following line to your `.vimrc`: +### 2) Enable in `.vimrc` + +Add the following line to your `.vimrc`: ``` colorscheme codedark ``` -If you have [`vim-airline`](https://github.com/vim-airline/vim-airline), you can also use the provided theme: +If you have [`vim-airline`](https://github.com/vim-airline/vim-airline), you can also enable the provided theme: ``` let g:airline_theme = 'codedark' ``` +### 3) Terminal support + +#### 3.1) If you use gVim +:+1: The colorscheme will work out of the box. No need to setup anything else! + +#### 3.2) If you use a terminal with at least 256 colors +**(e.g. GNOME Terminal, newest Bash for Windows)** + +If your terminal supports 256 and more colors (see [this script](http://www.robmeerman.co.uk/unix/256colours) if you want to test your terminal), this colorscheme should automatically use closest available colors to match the palette. You **may need to set `t_Co` to 256** in your `.vimrc` before setting the colorscheme: + +``` +set t_Co=256 +colorscheme codedark +``` + +(Additionally, if you don't want to or cannot use `t_Co`, you can `let g:codedark_term256=1`.) + +#### 3.3) If you use a terminal with only 8 or 16 colors + +:exclamation: Before following those steps, first try step 3.2) - maybe your terminal does support 256 colors! + +If your terminal does not support 256 colors, you may want to change your terminal colors: + +##### 3.3.1) Some Unix terminals +Clone [`base16-shell`](https://github.com/chriskempson/base16-shell/) into `~/.config/base16-shell`: + +``` +git clone https://github.com/chriskempson/base16-shell.git ~/.config/base16-shell +``` + +Then copy a script from this (`vim-code-dark`) repository (`base16/templates/shell/scripts/base16-codedark.sh`) into `~/.config/base16-shell/scripts`. + +Following the instructions from [`base16-shell`](https://github.com/chriskempson/base16-shell/), you should now modify your `~/.bashrc` or `~/.zshrc` (depending on your shell) and insert the following lines: + +``` +BASE16_SHELL=$HOME/.config/base16-shell/ +[ -n "$PS1" ] && [ -s $BASE16_SHELL/profile_helper.sh ] && eval "$($BASE16_SHELL/profile_helper.sh)" +``` + +Now start a new shell and type the following command: `base16_codedark`. + +You should now be able to use Vim with your new colorscheme. + +##### 3.3.2) iTerm2 +iTerm2 should actually support 256 colors, try setting `Report Terminal Type` to `xterm-256color` and follow step 3.2). If it does not work, you can manually modify your terminal colors in settings (`CMD+i`, Colors tab) following the [color palette picture](#color-palette). You will have to choose which color to use as red, blue etc. according to your personal preferences. + +##### 3.3.3) PuTTY +PuTTY should actually support 256 colors, try following [steps on StackOverflow](http://superuser.com/questions/436910/emulate-256-colors-in-putty-terminal). If it does not work, run `base16/templates/putty/putty/base16-codedark.reg` to modify your registry, then run PuTTY and load `codedark` in the session list. This will modify your PuTTY terminal colors. + +## FAQ + ### What is and how to enable the conservative mode? If you don't like many colors and prefer the **conservative style of the standard Visual Studio**, you can try the conservative mode with reduced number of colors. To enable it, put the following line to your `.vimrc` *before* setting the scheme, like so: @@ -47,9 +111,6 @@ colorscheme codedark ### Why does file syntax not look like in Visual Studio Code? Because Vim uses different syntax rules for files and this is just a colorscheme. -### Are terminal colors supported? -Unfortunately terminals are **not supported** yet, see [#2](https://github.com/tomasiser/vim-code-dark/issues/2) and feel free to send a pull request. - ### My favourite language XYZ has wrong colors! There are a lot of syntax definitions with different highlight groups. Feel free to send a pull request with additional highlight groups. diff --git a/autoload/airline/themes/codedark.vim b/autoload/airline/themes/codedark.vim index 84fbe05..ec393d8 100644 --- a/autoload/airline/themes/codedark.vim +++ b/autoload/airline/themes/codedark.vim @@ -5,24 +5,54 @@ scriptencoding utf-8 let g:airline#themes#codedark#palette = {} -let s:cdFront = {'gui': '#FFFFFF', 'cterm': '00'} -let s:cdFrontGray = {'gui': '#D4D4D4', 'cterm': '00'} -let s:cdBack = {'gui': '#1E1E1E', 'cterm': '00'} -let s:cdSelection = {'gui': '#264F78', 'cterm': '00'} +" Terminal colors (base16): +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists('base16colorspace') && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "00" + let s:cterm02 = "08" + let s:cterm04 = "07" + let s:cterm06 = "07" + let s:cterm09 = "06" + let s:cterm0F = "03" +endif -let s:cdPurple = {'gui': '#682279', 'cterm': '00'} -let s:cdBlue = {'gui': '#0A7ACA', 'cterm': '00'} -let s:cdLightBlue = {'gui': '#5cb6f8', 'cterm': '00'} -let s:cdDarkBlue = {'gui': '#11639B', 'cterm': '00'} -let s:cdOrange = {'gui': '#CE9178', 'cterm': '00'} -let s:cdYellow = {'gui': '#FFAF00', 'cterm': '00'} -let s:cdRed = {'gui': '#F44747', 'cterm': '00'} +if &t_Co >= 256 + let g:codedark_term256=1 +elseif !exists("g:codedark_term256") + let g:codedark_term256=0 +endif -let s:cdDarkDarkDark = {'gui': '#262626', 'cterm': '00'} -let s:cdDarkDark = {'gui': '#303030', 'cterm': '00'} -let s:cdDark = {'gui': '#3C3C3C', 'cterm': '00'} +let s:cdFront = {'gui': '#FFFFFF', 'cterm': (g:codedark_term256 ? '15' : s:cterm07)} +let s:cdFrontGray = {'gui': '#D4D4D4', 'cterm': (g:codedark_term256 ? '188' : s:cterm05)} +let s:cdBack = {'gui': '#1E1E1E', 'cterm': (g:codedark_term256 ? '234' : s:cterm00)} +let s:cdSelection = {'gui': '#264F78', 'cterm': (g:codedark_term256 ? '24' : s:cterm01)} -let s:Warning = [ s:cdRed.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none'] +let s:cdBlue = {'gui': '#0A7ACA', 'cterm': (g:codedark_term256 ? '32' : s:cterm0D)} +let s:cdLightBlue = {'gui': '#5CB6F8', 'cterm': (g:codedark_term256 ? '75' : s:cterm0C)} +let s:cdYellow = {'gui': '#FFAF00', 'cterm': (g:codedark_term256 ? '214' : s:cterm0A)} +let s:cdRed = {'gui': '#F44747', 'cterm': (g:codedark_term256 ? '203' : s:cterm08)} + +let s:cdDarkDarkDark = {'gui': '#262626', 'cterm': (g:codedark_term256 ? '235' : s:cterm01)} +let s:cdDarkDark = {'gui': '#303030', 'cterm': (g:codedark_term256 ? '236' : s:cterm02)} +let s:cdDark = {'gui': '#3C3C3C', 'cterm': (g:codedark_term256 ? '237' : s:cterm03)} + +let s:Warning = [ s:cdRed.gui, s:cdDarkDark.gui, s:cdRed.cterm, s:cdDarkDark.cterm, 'none'] " Normal: @@ -62,7 +92,7 @@ let g:airline#themes#codedark#palette.replace_modified.airline_warning = s:Warni " Visual: -let s:V1 = [ s:cdLightBlue.gui, s:cdDark.gui, s:cdFront.cterm, s:cdPurple.cterm, 'none' ] +let s:V1 = [ s:cdLightBlue.gui, s:cdDark.gui, s:cdLightBlue.cterm, s:cdDark.cterm, 'none' ] let s:V2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ] let s:V3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ] let s:VM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none'] diff --git a/base16/schemes/codedark/codedark.yaml b/base16/schemes/codedark/codedark.yaml new file mode 100644 index 0000000..103598c --- /dev/null +++ b/base16/schemes/codedark/codedark.yaml @@ -0,0 +1,18 @@ +scheme: "codedark" +author: "Tomas Iser (https://github.com/tomasiser)" +base00: "1E1E1E" +base01: "262626" +base02: "303030" +base03: "3C3C3C" +base04: "808080" +base05: "D4D4D4" +base06: "E9E9E9" +base07: "FFFFFF" +base08: "D16969" +base09: "B5CEA8" +base0A: "D7BA7D" +base0B: "608B4E" +base0C: "9CDCFE" +base0D: "569CD6" +base0E: "C586C0" +base0F: "CE9178" diff --git a/base16/templates/putty/putty/base16-codedark.reg b/base16/templates/putty/putty/base16-codedark.reg new file mode 100644 index 0000000..5b74f3a --- /dev/null +++ b/base16/templates/putty/putty/base16-codedark.reg @@ -0,0 +1,72 @@ +Windows Registry Editor Version 5.00 + +; Base16 codedark +; schema by Tomas Iser (https://github.com/tomasiser) +[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\codedark] + +; Default Foreground +"Colour0"="212,212,212" + +; Default Bold Foreground -- equals to non-bold +"Colour1"="212,212,212" + +; Default Background +"Colour2"="30,30,30" + +; Default Bold Background -- equals to non-bold +"Colour3"="30,30,30" + +; Cursor Text -- equals to default background +"Colour4"="30,30,30" + +; Cursor Colour -- equals to default foreground +"Colour5"="212,212,212" + +; ANSI Black +"Colour6"="30,30,30" + +; ANSI Black Bold +"Colour7"="60,60,60" + +; ANSI Red +"Colour8"="209,105,105" + +; ANSI Red Bold +"Colour9"="181,206,168" + +; ANSI Green +"Colour10"="96,139,78" + +; ANSI Green Bold +"Colour11"="38,38,38" + +; ANSI Yellow +"Colour12"="215,186,125" + +; ANSI Yellow Bold +"Colour13"="48,48,48" + +; ANSI Blue +"Colour14"="86,156,214" + +; ANSI Blue Bold +"Colour15"="128,128,128" + +; ANSI Magenta +"Colour16"="197,134,192" + +; ANSI Magenta Bold +"Colour17"="233,233,233" + +; ANSI Cyan +"Colour18"="156,220,254" + +; ANSI Cyan Bold +"Colour19"="206,145,120" + +; ANSI White +"Colour20"="212,212,212" + +; ANSI White Bold +"Colour21"="255,255,255" + diff --git a/base16/templates/shell/scripts/base16-codedark.sh b/base16/templates/shell/scripts/base16-codedark.sh new file mode 100644 index 0000000..ec2c545 --- /dev/null +++ b/base16/templates/shell/scripts/base16-codedark.sh @@ -0,0 +1,123 @@ +#!/bin/sh +# base16-shell (https://github.com/chriskempson/base16-shell) +# Base16 Shell template by Chris Kempson (http://chriskempson.com) +# codedark scheme by Tomas Iser (https://github.com/tomasiser) + +# This script doesn't support linux console (use 'vconsole' template instead) +if [ "${TERM%%-*}" = 'linux' ]; then + return 2>/dev/null || exit 0 +fi + +color00="1E/1E/1E" # Base 00 - Black +color01="D1/69/69" # Base 08 - Red +color02="60/8B/4E" # Base 0B - Green +color03="D7/BA/7D" # Base 0A - Yellow +color04="56/9C/D6" # Base 0D - Blue +color05="C5/86/C0" # Base 0E - Magenta +color06="9C/DC/FE" # Base 0C - Cyan +color07="D4/D4/D4" # Base 05 - White +color08="3C/3C/3C" # Base 03 - Bright Black +color09=$color01 # Base 08 - Bright Red +color10=$color02 # Base 0B - Bright Green +color11=$color03 # Base 0A - Bright Yellow +color12=$color04 # Base 0D - Bright Blue +color13=$color05 # Base 0E - Bright Magenta +color14=$color06 # Base 0C - Bright Cyan +color15="FF/FF/FF" # Base 07 - Bright White +color16="B5/CE/A8" # Base 09 +color17="CE/91/78" # Base 0F +color18="26/26/26" # Base 01 +color19="30/30/30" # Base 02 +color20="80/80/80" # Base 04 +color21="E9/E9/E9" # Base 06 +color_foreground="D4/D4/D4" # Base 05 +color_background="1E/1E/1E" # Base 00 +color_cursor="D4/D4/D4" # Base 05 + +if [ -n "$TMUX" ]; then + # Tell tmux to pass the escape sequences through + # (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324) + printf_template='\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\' + printf_template_var='\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\' + printf_template_custom='\033Ptmux;\033\033]%s%s\033\033\\\033\\' +elif [ "${TERM%%-*}" = "screen" ]; then + # GNU screen (screen, screen-256color, screen-256color-bce) + printf_template='\033P\033]4;%d;rgb:%s\033\\' + printf_template_var='\033P\033]%d;rgb:%s\033\\' + printf_template_custom='\033P\033]%s%s\033\\' +else + printf_template='\033]4;%d;rgb:%s\033\\' + printf_template_var='\033]%d;rgb:%s\033\\' + printf_template_custom='\033]%s%s\033\\' +fi + +# 16 color space +printf $printf_template 0 $color00 +printf $printf_template 1 $color01 +printf $printf_template 2 $color02 +printf $printf_template 3 $color03 +printf $printf_template 4 $color04 +printf $printf_template 5 $color05 +printf $printf_template 6 $color06 +printf $printf_template 7 $color07 +printf $printf_template 8 $color08 +printf $printf_template 9 $color09 +printf $printf_template 10 $color10 +printf $printf_template 11 $color11 +printf $printf_template 12 $color12 +printf $printf_template 13 $color13 +printf $printf_template 14 $color14 +printf $printf_template 15 $color15 + +# 256 color space +printf $printf_template 16 $color16 +printf $printf_template 17 $color17 +printf $printf_template 18 $color18 +printf $printf_template 19 $color19 +printf $printf_template 20 $color20 +printf $printf_template 21 $color21 + +# foreground / background / cursor color +if [ -n "$ITERM_SESSION_ID" ]; then + # iTerm2 proprietary escape codes + printf $printf_template_custom Pg D4D4D4 # forground + printf $printf_template_custom Ph 1E1E1E # background + printf $printf_template_custom Pi D4D4D4 # bold color + printf $printf_template_custom Pj 303030 # selection color + printf $printf_template_custom Pk D4D4D4 # selected text color + printf $printf_template_custom Pl D4D4D4 # cursor + printf $printf_template_custom Pm 1E1E1E # cursor text +else + printf $printf_template_var 10 $color_foreground + printf $printf_template_var 11 $color_background + printf $printf_template_custom 12 ";7" # cursor (reverse video) +fi + +# clean up +unset printf_template +unset printf_template_var +unset color00 +unset color01 +unset color02 +unset color03 +unset color04 +unset color05 +unset color06 +unset color07 +unset color08 +unset color09 +unset color10 +unset color11 +unset color12 +unset color13 +unset color14 +unset color15 +unset color16 +unset color17 +unset color18 +unset color19 +unset color20 +unset color21 +unset color_foreground +unset color_background +unset color_cursor diff --git a/colors/codedark.vim b/colors/codedark.vim index 2fdebfd..99ddd34 100644 --- a/colors/codedark.vim +++ b/colors/codedark.vim @@ -11,12 +11,17 @@ endif let g:colors_name="codedark" " Highlighting function (inspiration from https://github.com/chriskempson/base16-vim) +if &t_Co >= 256 + let g:codedark_term256=1 +elseif !exists("g:codedark_term256") + let g:codedark_term256=0 +endif fun! hi(group, fg, bg, attr, sp) if !empty(a:fg) - exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . a:fg.cterm + exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . (g:codedark_term256 ? a:fg.cterm256 : a:fg.cterm) endif if !empty(a:bg) - exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . a:bg.cterm + exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . (g:codedark_term256 ? a:bg.cterm256 : a:bg.cterm) endif if a:attr != "" exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr @@ -30,44 +35,71 @@ endfun " Color definitions: " ------------------ +" Terminal colors (base16): +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists('base16colorspace') && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "00" + let s:cterm02 = "08" + let s:cterm04 = "07" + let s:cterm06 = "07" + let s:cterm09 = "06" + let s:cterm0F = "03" +endif + " General appearance colors: " (some of them may be unused) -let s:cdNone = {'gui': 'NONE', 'cterm': 'NONE'} -let s:cdFront = {'gui': '#D4D4D4', 'cterm': '00'} -let s:cdBack = {'gui': '#1E1E1E', 'cterm': '00'} +let s:cdNone = {'gui': 'NONE', 'cterm': 'NONE', 'cterm256': 'NONE'} +let s:cdFront = {'gui': '#D4D4D4', 'cterm': s:cterm05, 'cterm256': '188'} +let s:cdBack = {'gui': '#1E1E1E', 'cterm': s:cterm00, 'cterm256': '234'} -let s:cdTabCurrent = {'gui': '#1E1E1E', 'cterm': '00'} -let s:cdTabOther = {'gui': '#2D2D2D', 'cterm': '00'} -let s:cdTabOutside = {'gui': '#252526', 'cterm': '00'} +let s:cdTabCurrent = {'gui': '#1E1E1E', 'cterm': s:cterm00, 'cterm256': '234'} +let s:cdTabOther = {'gui': '#2D2D2D', 'cterm': s:cterm01, 'cterm256': '236'} +let s:cdTabOutside = {'gui': '#252526', 'cterm': s:cterm01, 'cterm256': '235'} -let s:cdLeftDark = {'gui': '#252526', 'cterm': '00'} -let s:cdLeftMid = {'gui': '#373737', 'cterm': '00'} -let s:cdLeftLight = {'gui': '#3F3F46', 'cterm': '00'} +let s:cdLeftDark = {'gui': '#252526', 'cterm': s:cterm01, 'cterm256': '235'} +let s:cdLeftMid = {'gui': '#373737', 'cterm': s:cterm03, 'cterm256': '237'} +let s:cdLeftLight = {'gui': '#3F3F46', 'cterm': s:cterm03, 'cterm256': '238'} -let s:cdPopupFront = {'gui': '#BBBBBB', 'cterm': '00'} -let s:cdPopupBack = {'gui': '#2D2D30', 'cterm': '00'} -let s:cdPopupHighlightBlue = {'gui': '#073655', 'cterm': '00'} -let s:cdPopupHighlightGray = {'gui': '#3D3D40', 'cterm': '00'} +let s:cdPopupFront = {'gui': '#BBBBBB', 'cterm': s:cterm06, 'cterm256': '250'} +let s:cdPopupBack = {'gui': '#2D2D30', 'cterm': s:cterm01, 'cterm256': '236'} +let s:cdPopupHighlightBlue = {'gui': '#073655', 'cterm': s:cterm0D, 'cterm256': '24'} +let s:cdPopupHighlightGray = {'gui': '#3D3D40', 'cterm': s:cterm03, 'cterm256': '237'} -let s:cdSplitLight = {'gui': '#898989', 'cterm': '00'} -let s:cdSplitDark = {'gui': '#444444', 'cterm': '00'} -let s:cdSplitThumb = {'gui': '#424242', 'cterm': '00'} +let s:cdSplitLight = {'gui': '#898989', 'cterm': s:cterm04, 'cterm256': '245'} +let s:cdSplitDark = {'gui': '#444444', 'cterm': s:cterm03, 'cterm256': '238'} +let s:cdSplitThumb = {'gui': '#424242', 'cterm': s:cterm04, 'cterm256': '238'} -let s:cdCursorDarkDark = {'gui': '#222222', 'cterm': '00'} -let s:cdCursorDark = {'gui': '#51504F', 'cterm': '00'} -let s:cdCursorLight = {'gui': '#AEAFAD', 'cterm': '00'} -let s:cdSelection = {'gui': '#264F78', 'cterm': '00'} -let s:cdLineNumber = {'gui': '#5A5A5A', 'cterm': '00'} +let s:cdCursorDarkDark = {'gui': '#222222', 'cterm': s:cterm01, 'cterm256': '235'} +let s:cdCursorDark = {'gui': '#51504F', 'cterm': s:cterm03, 'cterm256': '239'} +let s:cdCursorLight = {'gui': '#AEAFAD', 'cterm': s:cterm04, 'cterm256': '145'} +let s:cdSelection = {'gui': '#264F78', 'cterm': s:cterm03, 'cterm256': '24'} +let s:cdLineNumber = {'gui': '#5A5A5A', 'cterm': s:cterm04, 'cterm256': '240'} -let s:cdDiffRedDark = {'gui': '#4B1818', 'cterm': '00'} -let s:cdDiffRedLight = {'gui': '#6F1313', 'cterm': '00'} -let s:cdDiffRedLightLight = {'gui': '#FB0101', 'cterm': '00'} -let s:cdDiffGreenDark = {'gui': '#373D29', 'cterm': '00'} -let s:cdDiffGreenLight = {'gui': '#4B5632', 'cterm': '00'} +let s:cdDiffRedDark = {'gui': '#4B1818', 'cterm': s:cterm08, 'cterm256': '52'} +let s:cdDiffRedLight = {'gui': '#6F1313', 'cterm': s:cterm08, 'cterm256': '52'} +let s:cdDiffRedLightLight = {'gui': '#FB0101', 'cterm': s:cterm08, 'cterm256': '09'} +let s:cdDiffGreenDark = {'gui': '#373D29', 'cterm': s:cterm0B, 'cterm256': '237'} +let s:cdDiffGreenLight = {'gui': '#4B5632', 'cterm': s:cterm09, 'cterm256': '58'} -let s:cdSearchCurrent = {'gui': '#49545F', 'cterm': '00'} -let s:cdSearch = {'gui': '#4C4E50', 'cterm': '00'} +let s:cdSearchCurrent = {'gui': '#49545F', 'cterm': s:cterm09, 'cterm256': '239'} +let s:cdSearch = {'gui': '#4C4E50', 'cterm': s:cterm0A, 'cterm256': '239'} " Syntax colors: @@ -75,22 +107,22 @@ if !exists("g:codedark_conservative") let g:codedark_conservative=0 endif -let s:cdGray = {'gui': '#808080', 'cterm': '00'} -let s:cdViolet = {'gui': '#646695', 'cterm': '00'} -let s:cdBlue = {'gui': '#569CD6', 'cterm': '00'} -let s:cdLightBlue = {'gui': '#9CDCFE', 'cterm': '00'} +let s:cdGray = {'gui': '#808080', 'cterm': s:cterm04, 'cterm256': '08'} +let s:cdViolet = {'gui': '#646695', 'cterm': s:cterm04, 'cterm256': '60'} +let s:cdBlue = {'gui': '#569CD6', 'cterm': s:cterm0D, 'cterm256': '75'} +let s:cdLightBlue = {'gui': '#9CDCFE', 'cterm': s:cterm0C, 'cterm256': '117'} if g:codedark_conservative | let s:cdLightBlue = s:cdFront | endif -let s:cdGreen = {'gui': '#608B4E', 'cterm': '00'} -let s:cdBlueGreen = {'gui': '#4EC9B0', 'cterm': '00'} -let s:cdLightGreen = {'gui': '#B5CEA8', 'cterm': '00'} -let s:cdRed = {'gui': '#F44747', 'cterm': '00'} -let s:cdOrange = {'gui': '#CE9178', 'cterm': '00'} -let s:cdLightRed = {'gui': '#D16969', 'cterm': '00'} +let s:cdGreen = {'gui': '#608B4E', 'cterm': s:cterm0B, 'cterm256': '65'} +let s:cdBlueGreen = {'gui': '#4EC9B0', 'cterm': s:cterm0F, 'cterm256': '43'} +let s:cdLightGreen = {'gui': '#B5CEA8', 'cterm': s:cterm09, 'cterm256': '151'} +let s:cdRed = {'gui': '#F44747', 'cterm': s:cterm08, 'cterm256': '203'} +let s:cdOrange = {'gui': '#CE9178', 'cterm': s:cterm0F, 'cterm256': '173'} +let s:cdLightRed = {'gui': '#D16969', 'cterm': s:cterm08, 'cterm256': '167'} if g:codedark_conservative | let s:cdLightRed = s:cdOrange | endif -let s:cdYellowOrange = {'gui': '#D7BA7D', 'cterm': '00'} -let s:cdYellow = {'gui': '#DCDCAA', 'cterm': '00'} +let s:cdYellowOrange = {'gui': '#D7BA7D', 'cterm': s:cterm0A, 'cterm256': '179'} +let s:cdYellow = {'gui': '#DCDCAA', 'cterm': s:cterm0A, 'cterm256': '187'} if g:codedark_conservative | let s:cdYellow = s:cdFront | endif -let s:cdPink = {'gui': '#C586C0', 'cterm': '00'} +let s:cdPink = {'gui': '#C586C0', 'cterm': s:cterm0E, 'cterm256': '176'} if g:codedark_conservative | let s:cdPink = s:cdBlue | endif " Vim editor colors @@ -116,7 +148,7 @@ call hi('CursorLineNr', s:cdPopupFront, s:cdBack, 'none', {}) call hi('MatchParen', s:cdNone, s:cdNone, 'inverse', {}) call hi('ModeMsg', s:cdFront, s:cdLeftDark, 'none', {}) call hi('MoreMsg', s:cdFront, s:cdLeftDark, 'none', {}) -call hi('NonText', {}, s:cdLeftDark, 'none', {}) +call hi('NonText', s:cdLineNumber, s:cdBack, 'none', {}) call hi('Pmenu', s:cdPopupFront, s:cdPopupBack, 'none', {}) call hi('PmenuSel', s:cdPopupFront, s:cdPopupHighlightBlue, 'none', {}) call hi('PmenuSbar', {}, s:cdPopupHighlightGray, 'none', {})