Skip to content

Commit 1adfda2

Browse files
committed
Updated the colorscheme and the README.
1 parent 00fcfc6 commit 1adfda2

File tree

2 files changed

+31
-58
lines changed

2 files changed

+31
-58
lines changed

README.md

Lines changed: 26 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Apprentice is a low-contrast colorscheme for Vim based on the awesome [Sorcerer](http://www.vim.org/scripts/script.php?script_id=3299) by Jeet Sukumaran.
44

5-
It’s essentially a streamlined version of the original with a reduced number of colors entirely taken from the default xterm palette to ensure a similar look in 256 colors-ready terminal emulators and GUI Vim.
5+
It is essentially a streamlined version of the original, with a reduced number of colors entirely taken from the default xterm palette to ensure a similar look in 256colors-ready terminal emulators and GUI Vim.
66

77
Some JavaScript, in MacVim:
88

@@ -22,52 +22,48 @@ Apprentice is designed first and foremost to look “good” in terminal emulato
2222

2323
### GVim/MacVim
2424

25-
There’s nothing to do for GVim/MacVim as GUI Vim supports millions of colors by default.
25+
There is nothing to do for GVim/MacVim as GUI Vim supports millions of colors by default.
2626

27-
### Terminal emulators
27+
### 256color-ready Terminal emulators
2828

2929
Most terminal emulators in use nowadays *can* display 256 colors but most of them use a default `TERM` that tells Vim otherwise. Assuming your terminal emulator actually supports 256 colors, you must instruct it to brag about its terminal-hood by setting the correct `TERM` environment variable.
3030

31-
Here are a bunch of common terminal emulators and their “ideal” `TERM`:
31+
The “ideal” `TERM` usually includes the string `256color` like `xterm-256color`. The actual value is highly dependent on your terminal emulator and/or your terminal multiplexer, though, so you will have to refer to their manual.
3232

33-
| Environment | Terminal emulator | Default `TERM` | ”Ideal” `TERM` |
34-
|-------------|-------------------|----------------|-------------------------|
35-
| Mac OS X | iTerm2.app | `xterm` | `xterm-256color` |
36-
| Mac OS X | Terminal.app | `xterm` | `xterm-256color` |
37-
| X11 | xterm | `xterm` | `xterm-256color` |
38-
| X11 | URxvt | `rxvt-unicode` | `rxvt-unicode-256color` |
39-
| X11/Gnome | Gnome terminal | `xterm` | `xterm-256color` |
40-
| X11/Gnome | Terminator | `xterm` | `xterm-256color` |
41-
| X11/KDE | Konsole | `xterm` | `xterm-256color` |
33+
### Working with a 8/16 colors
4234

43-
Please refer to your terminal emulator’s manual for how to set it up properly.
35+
As an alternative to changing your default `TERM` to `xterm-256color` or similar, you can keep its default value, (usually something like `xterm` or `screen`) and set your terminal emulator to use the Apprentice colorscheme instead of its default colors.
4436

45-
NB: I’ve started [a wiki page](https://github.com/romainl/Apprentice/wiki/256-colors-and-you.) listing the procedures for the terminal emlators above.
37+
The table below contains a subset of Apprentice’s palette. You can use a color picker or copy/paste these values:
4638

47-
For best results, it’s recommended to adjust your background color to the one used in the GUI/256color version of Apprentice:
39+
| Intensity | Normal | Intensity | Bright |
40+
|-----------|-----------------------------------------------------------------------------|-----------|-----------------------------------------------------------------------------|
41+
| 0 | `#1C1C1C` ![#1C1C1C](http://romainl.github.io/Apprentice/images/1c1c1c.png) | 8 | `#444444` ![#444444](http://romainl.github.io/Apprentice/images/444444.png) |
42+
| 1 | `#AF5F5F` ![#AF5F5F](http://romainl.github.io/Apprentice/images/af5f5f.png) | 9 | `#FF8700` ![#FF8700](http://romainl.github.io/Apprentice/images/ff8700.png) |
43+
| 2 | `#5F875F` ![#5F875F](http://romainl.github.io/Apprentice/images/5f875f.png) | 10 | `#87AF87` ![#87AF87](http://romainl.github.io/Apprentice/images/87af87.png) |
44+
| 3 | `#87875F` ![#87875F](http://romainl.github.io/Apprentice/images/87875f.png) | 11 | `#FFFFAF` ![#FFFFAF](http://romainl.github.io/Apprentice/images/ffffaf.png) |
45+
| 4 | `#5F87AF` ![#5F87AF](http://romainl.github.io/Apprentice/images/5f87af.png) | 12 | `#8FAFD7` ![#8FAFD7](http://romainl.github.io/Apprentice/images/8fafd7.png) |
46+
| 5 | `#5F5F87` ![#5F5F87](http://romainl.github.io/Apprentice/images/5f5f87.png) | 13 | `#8787AF` ![#8787AF](http://romainl.github.io/Apprentice/images/8787af.png) |
47+
| 6 | `#5F8787` ![#5F8787](http://romainl.github.io/Apprentice/images/5f8787.png) | 14 | `#5FAFAF` ![#5FAFAF](http://romainl.github.io/Apprentice/images/5fafaf.png) |
48+
| 7 | `#6C6C6C` ![#6C6C6C](http://romainl.github.io/Apprentice/images/6c6c6c.png) | 15 | `#FFFFFF` ![#FFFFFF](http://romainl.github.io/Apprentice/images/ffffff.png) |
49+
| Foreground color | `#BCBCBC` ![#BCBCBC](http://romainl.github.io/Apprentice/images/bcbcbc.png) |||
50+
| Background color | `#262626` ![#262626](http://romainl.github.io/Apprentice/images/262626.png) |||
4851

49-
* xterm color: `235`
50-
* hexadecimal color: `#262626`
51-
52-
### Terminal multiplexers
53-
54-
Screen and tmux don't respect your terminal emulator’s settings and set your `TERM` to their default value, `screen`. For better color support, the recommended `TERM` for both multiplexers is `screen-256color`.
55-
56-
#### tmux
52+
The same JavaScript as above, in iTerm, with `TERM=xterm`, using the color palette below:
5753

58-
Put this line in `~/.tmux.conf`:
54+
![image](http://romainl.github.io/Apprentice/images/016termapprentice.png)
5955

60-
set -g default-terminal "screen-256color"
6156

62-
#### screen
57+
### All terminal emulators
6358

64-
Put this line in `~/.screenrc`:
59+
For best results, it is recommended to adjust your background color to the one used in the GUI/256color version of Apprentice:
6560

66-
term "screen-256color"
61+
* xterm color: `235`
62+
* hexadecimal color: `#262626`
6763

6864
## Installing Apprentice.
6965

70-
A colorscheme must be placed in a directory named `colors` that’s somewhere in Vim’s `runtimepath`:
66+
A colorscheme must be placed in a directory named `colors` that is somewhere in Vim’s `runtimepath`:
7167

7268
The canonical location is:
7369

@@ -79,29 +75,6 @@ but it could be:
7975

8076
or whatever works for you.
8177

82-
### Working with a 8 colors terminal
83-
84-
As an alternative to `xterm-256color`, you can also leave your `TERM` at its default value, (usually `xterm` or `screen`, as we saw earlier) and set your terminal emulator to use the Apprentice colorscheme instead of its default colors.
85-
86-
The same JavaScript as above, in iTerm, with `TERM=xterm`, using the color palette below:
87-
88-
![image](http://romainl.github.io/Apprentice/images/016termapprentice.png)
89-
90-
Use a color picker or copy/paste these values:
91-
92-
| Intensity | Name | Normal | Bright |
93-
|-----------|---------|-----------------------------------------------------------------------------|-----------------------------------------------------------------------------|
94-
| 0 | Black | `#1C1C1C` ![#1C1C1C](http://romainl.github.io/Apprentice/images/1c1c1c.png) | `#444444` ![#444444](http://romainl.github.io/Apprentice/images/444444.png) |
95-
| 1 | Red | `#AF5F5F` ![#AF5F5F](http://romainl.github.io/Apprentice/images/af5f5f.png) | `#FF8700` ![#FF8700](http://romainl.github.io/Apprentice/images/ff8700.png) |
96-
| 2 | Green | `#5F875F` ![#5F875F](http://romainl.github.io/Apprentice/images/5f875f.png) | `#87AF87` ![#87AF87](http://romainl.github.io/Apprentice/images/87af87.png) |
97-
| 3 | Yellow | `#87875F` ![#87875F](http://romainl.github.io/Apprentice/images/87875f.png) | `#FFFFAF` ![#FFFFAF](http://romainl.github.io/Apprentice/images/ffffaf.png) |
98-
| 4 | Blue | `#5F87AF` ![#5F87AF](http://romainl.github.io/Apprentice/images/5f87af.png) | `#8FAFD7` ![#8FAFD7](http://romainl.github.io/Apprentice/images/8fafd7.png) |
99-
| 5 | Magenta | `#5F5F87` ![#5F5F87](http://romainl.github.io/Apprentice/images/5f5f87.png) | `#8787AF` ![#8787AF](http://romainl.github.io/Apprentice/images/8787af.png) |
100-
| 6 | Cyan | `#5F8787` ![#5F8787](http://romainl.github.io/Apprentice/images/5f8787.png) | `#5FAFAF` ![#5FAFAF](http://romainl.github.io/Apprentice/images/5fafaf.png) |
101-
| 7 | White | `#6C6C6C` ![#6C6C6C](http://romainl.github.io/Apprentice/images/6c6c6c.png) | `#FFFFFF` ![#FFFFFF](http://romainl.github.io/Apprentice/images/ffffff.png) |
102-
|| Foreground color | `#BCBCBC` ![#BCBCBC](http://romainl.github.io/Apprentice/images/bcbcbc.png) ||
103-
|| Background color | `#262626` ![#262626](http://romainl.github.io/Apprentice/images/262626.png) ||
104-
10578
## Enabling Apprentice.
10679

10780
To test Apprentice, just type this command from *normal* mode and hit `Enter`:

colors/apprentice.vim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,17 @@ if &t_Co >= 256 || has('gui_running')
9393
hi ColorColumn ctermbg=131 ctermfg=NONE guibg=#af5f5f guifg=NONE cterm=NONE gui=NONE
9494
hi SignColumn ctermbg=238 ctermfg=235 guibg=#444444 guifg=#262626 cterm=NONE gui=NONE
9595

96-
elseif &t_Co == 8 && $TERM !~# '^linux'
96+
elseif &t_Co == 8 || $TERM !~# '^linux' || &t_Co == 16
9797
set t_Co=16
9898

9999
hi Normal ctermbg=NONE ctermfg=15 cterm=NONE
100100
hi Comment ctermbg=NONE ctermfg=7 cterm=NONE
101101
hi Constant ctermbg=NONE ctermfg=9 cterm=NONE
102102
hi Function ctermbg=NONE ctermfg=3 cterm=NONE
103-
hi Identifier ctermbg=NONE ctermfg=9 cterm=NONE
103+
hi Identifier ctermbg=NONE ctermfg=12 cterm=NONE
104104
hi PreProc ctermbg=NONE ctermfg=6 cterm=NONE
105105
hi Special ctermbg=NONE ctermfg=10 cterm=NONE
106-
hi Statement ctermbg=NONE ctermfg=6 cterm=NONE
106+
hi Statement ctermbg=NONE ctermfg=12 cterm=NONE
107107
hi String ctermbg=NONE ctermfg=2 cterm=NONE
108108
hi Todo ctermbg=NONE ctermfg=NONE cterm=reverse
109109
hi Type ctermbg=NONE ctermfg=13 cterm=NONE
@@ -132,7 +132,7 @@ elseif &t_Co == 8 && $TERM !~# '^linux'
132132

133133
hi Cursor ctermbg=NONE ctermfg=NONE cterm=NONE
134134
hi CursorLine ctermbg=8 ctermfg=NONE cterm=NONE
135-
hi CursorLineNr ctermbg=NONE ctermfg=15 cterm=NONE
135+
hi CursorLineNr ctermbg=8 ctermfg=14 cterm=NONE
136136

137137
hi helpLeadBlank ctermbg=NONE ctermfg=NONE cterm=NONE
138138
hi helpNormal ctermbg=NONE ctermfg=NONE cterm=NONE
@@ -147,7 +147,7 @@ elseif &t_Co == 8 && $TERM !~# '^linux'
147147
hi Folded ctermbg=8 ctermfg=15 cterm=NONE
148148

149149
hi VertSplit ctermbg=8 ctermfg=8 cterm=NONE
150-
hi WildMenu ctermbg=13 ctermfg=0 cterm=NONE
150+
hi WildMenu ctermbg=14 ctermfg=0 cterm=NONE
151151

152152
hi Function ctermbg=NONE ctermfg=11 cterm=NONE
153153
hi SpecialKey ctermbg=NONE ctermfg=8 cterm=NONE

0 commit comments

Comments
 (0)