Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/NLKNguyen/papercolor-theme

:art: Light & Dark Vim color schemes inspired by Google's Material Design
https://github.com/NLKNguyen/papercolor-theme

theme vim

Last synced: about 2 months ago
JSON representation

:art: Light & Dark Vim color schemes inspired by Google's Material Design

Awesome Lists containing this project

README

        


License: MIT



License: MIT


License: MIT


Closed issues


Patreon donate button


Open Collective donate button


PayPal donate button


Amazon donate button



Buy Me A Coffee

Light & Dark color schemes for terminal and GUI **Vim** awesome editor

Inspired by Google's Material Design. Improve code readability! Great for presentation!

It is optimized to load fast and support 4-bit, 8-bit and 24-bit color terminals or GUIs. For full color spectrum, any 8-bit (256-color) capable display is sufficient.

**Plus:** PaperColor is also a syntax highlighting framework for creating color themes, in which the PaperColor theme you see here is the default. If you want to create your own theme, consider creating on top of PaperColor to leverage 100% its functionality and still have your own specialization.

![Light](https://nlknguyen.files.wordpress.com/2015/05/asm.png)

![Dark](https://nlknguyen.files.wordpress.com/2015/05/c-dark-split.png)

***
Why was this theme created? [Read the background story](https://dephony.com/blog/software-updates/papercolor-theme-v1-0/)
***

# ✨ Inclusive support

## 🎨 Colors

Support True / GUI color (24-bit) and identical **256 color** (8-bit) that the default theme is based on.

Also gracefully support down to **16 color** (4-bit) terminal, which will use terminal native colors. You need to change the terminal colors to PaperColor palette.

In **8 color** and **4 color** terminals, they might lack the necessary variation of colors to express PaperColor look, but seriously let me know if you still use these kinds of terminals.

**Default Theme Palette**

| | Light Theme | 8-bit | 24-bit | Dark Theme | 8-bit | 24-bit |
|--- | ----- | -------|---------| ----- | -------|---------|
| 0 |![#eeeeee](https://place-hold.it/100x40/eeeeee/000000?text=+) | 255 | #eeeeee |![#1c1c1c](https://place-hold.it/100x40/1c1c1c/000000?text=+) | 234 | #1c1c1c |
| 1 |![#af0000](https://place-hold.it/100x40/af0000/000000?text=+) | 124 | #af0000 |![#af005f](https://place-hold.it/100x40/af005f/000000?text=+) | 125 | #af005f |
| 2 |![#008700](https://place-hold.it/100x40/008700/000000?text=+) | 28 | #008700 |![#5faf00](https://place-hold.it/100x40/5faf00/000000?text=+) | 70 | #5faf00 |
| 3 |![#5f8700](https://place-hold.it/100x40/5f8700/000000?text=+) | 64 | #5f8700 |![#d7af5f](https://place-hold.it/100x40/d7af5f/000000?text=+) | 179 | #d7af5f |
| 4 |![#0087af](https://place-hold.it/100x40/0087af/000000?text=+) | 31 | #0087af |![#5fafd7](https://place-hold.it/100x40/5fafd7/000000?text=+) | 74 | #5fafd7 |
| 5 |![#878787](https://place-hold.it/100x40/878787/000000?text=+) | 102 | #878787 |![#808080](https://place-hold.it/100x40/808080/000000?text=+) | 244 | #808080 |
| 6 |![#005f87](https://place-hold.it/100x40/005f87/000000?text=+) | 24 | #005f87 |![#d7875f](https://place-hold.it/100x40/d7875f/000000?text=+) | 173 | #d7875f |
| 7 |![#444444](https://place-hold.it/100x40/444444/000000?text=+) | 238 | #444444 |![#d0d0d0](https://place-hold.it/100x40/d0d0d0/000000?text=+) | 252 | #d0d0d0 |
| 8 |![#bcbcbc](https://place-hold.it/100x40/bcbcbc/000000?text=+) | 250 | #bcbcbc |![#585858](https://place-hold.it/100x40/585858/000000?text=+) | 240 | #585858 |
| 9 |![#d70000](https://place-hold.it/100x40/d70000/000000?text=+) | 160 | #d70000 |![#5faf5f](https://place-hold.it/100x40/5faf5f/000000?text=+) | 71 | #5faf5f |
| 10 |![#d70087](https://place-hold.it/100x40/d70087/000000?text=+) | 162 | #d70087 |![#afd700](https://place-hold.it/100x40/afd700/000000?text=+) | 148 | #afd700 |
| 11 |![#8700af](https://place-hold.it/100x40/8700af/000000?text=+) | 91 | #8700af |![#af87d7](https://place-hold.it/100x40/af87d7/000000?text=+) | 140 | #af87d7 |
| 12 |![#d75f00](https://place-hold.it/100x40/d75f00/000000?text=+) | 166 | #d75f00 |![#ffaf00](https://place-hold.it/100x40/ffaf00/000000?text=+) | 214 | #ffaf00 |
| 13 |![#d75f00](https://place-hold.it/100x40/d75f00/000000?text=+) | 166 | #d75f00 |![#ff5faf](https://place-hold.it/100x40/ff5faf/000000?text=+) | 205 | #ff5faf |
| 14 |![#005faf](https://place-hold.it/100x40/005faf/000000?text=+) | 25 | #005faf |![#00afaf](https://place-hold.it/100x40/00afaf/000000?text=+) | 37 | #00afaf |
| 15 |![#005f87](https://place-hold.it/100x40/005f87/000000?text=+) | 24 | #005f87 |![#5f8787](https://place-hold.it/100x40/5f8787/000000?text=+) | 66 | #5f8787 |

There are many more colors for many additional syntax groups, but they are designed to fall back to these base 16 colors strategically so that it can utilize the terminal native color palette (if configured like above), and also theme designers only need to provide 16 colors for a functional theme.

## 🚀 Languages

Currently designed for these languages:
- Haskell, Erlang, Elixir, Clojure, Elm, Purescript, F#
- C, C++, Golang, Rust, Java, JavaScript, Python, Ruby, Pascal, PHP, Perl, LUA
- DTrace, SystemTap, SQL/MySQL, Octave/MATLAB, R, Lex/Flex & Yacc/Bison, ASN.1, Assembly (MIPS, GAS, NASM), Bash/Shell script, Sed, Awk, Vim script, Powershell script
- Dockerfile, Makefile, CMake, NGINX, Cucumber, YAML, JSON, HTML, XML, Markdown, reStructuredText, PlantUML, Dosini, Mail, Git commit message
- Ada, COBOL, Fortran, ALGOL, *(what's your other favorite dinosaur?)*

Other file types can still display well as long as your Vim is set up to recognize the language syntax even though that may not be the optimal experience. So, if the language you are working on isn't listed here, feel free to make a design request.
## 📚 Targeted plugins for additional syntax highlighting

vimdiff, netrw, [NERDTree](https://github.com/scrooloose/nerdtree), [tagbar](https://github.com/majutsushi/tagbar), [tabline](https://github.com/mkitt/tabline.vim), [vim-airline](https://github.com/bling/vim-airline), [vim-indent-guides](https://github.com/nathanaelkane/vim-indent-guides), [vim-startify](https://github.com/mhinz/vim-startify), [Agit](https://github.com/cohama/agit.vim), [vim-signify](https://github.com/mhinz/vim-signify), [nvim-dap-ui](https://github.com/rcarriga/nvim-dap-ui) ([PR](https://github.com/NLKNguyen/papercolor-theme/pull/181)), [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) ([PR](https://github.com/NLKNguyen/papercolor-theme/pull/182)), [vim-gitgutter](https://github.com/airblade/vim-gitgutter)

The below are programming language syntax highlighting plugins that enhances upon Vim built-in syntax highlighting.

* C: [c-syntax.vim](https://github.com/NLKNguyen/c-syntax.vim)
* JavaScript: [vim-javascript](https://github.com/pangloss/vim-javascript)
* Jsx: [vim-jsx-pretty](https://github.com/MaxMEllon/vim-jsx-pretty)
* JSON: [vim-json](https://github.com/elzr/vim-json)
* Go: [vim-go](https://github.com/fatih/vim-go)
* DTrace: [dtrace-syntax-file](https://github.com/vim-scripts/dtrace-syntax-file)
* SystemTap: [vim-systemtap](https://github.com/nickhutchinson/vim-systemtap)
* Haskell: [haskell-vim](https://github.com/raichoo/haskell-vim)
* PlantUML: [plantuml-syntax](https://github.com/aklt/plantuml-syntax)
* Markdown: [vim-markdown](https://github.com/plasticboy/vim-markdown)
* Assembly MIPS: [mips](https://github.com/vim-scripts/mips.vim)
* Assembly GAS: [vim-gas](https://github.com/Shirk/vim-gas)
* Octave/MATLAB: [vim-octave](https://github.com/jvirtanen/vim-octave)
* Python: [python-syntax](https://github.com/vim-python/python-syntax/)
* Dockerfile: [dockerfile.vim](https://github.com/docker/docker/tree/master/contrib/syntax/vim)
* NGINX: [nginx-vim-syntax](https://github.com/evanmiller/nginx-vim-syntax)
* Elixir: [vim-elixir](https://github.com/elixir-lang/vim-elixir)
* Elm: [elm-vim](https://github.com/ElmCast/elm-vim)
* Purescript: [purescript-vim](https://github.com/purescript-contrib/purescript-vim)
* F#: [vim-fsharp](https://github.com/fsharp/vim-fsharp)
* PowerShell: [vim-ps1](https://github.com/PProvost/vim-ps1)
* CMake: [vim-cmake-syntax](https://github.com/pboettch/vim-cmake-syntax)
* ALGOL: [vim-algol68](https://github.com/sterpe/vim-algol68)

# 🔌 Installation

### Using a plugin manager

It's easy to use a plugin manager like [Vundle](https://github.com/gmarik/Vundle.vim) (recommended for convenient `:PluginUpdate`). Add this to your .vimrc where Vundle is configured, and run `:PluginInstall`

Plugin 'NLKNguyen/papercolor-theme'

A newer and popular plugin manager is Plug that you can use as well. Similar setup like above; run `:PlugInstall`

Plug 'NLKNguyen/papercolor-theme'

To use vims built in package manager use this command

git clone https://github.com/NLKNguyen/papercolor-theme.git ~/.vim/pack/colors/start/papercolor-theme


### Manual

If you can't use a plugin manager (you should), then manually place `PaperColor.vim` file into `colors` folder within your Vim directory, e.g. `~/.vim/colors/`

## ⭐ Configure `.vimrc`

Put this in your `~/.vimrc`

```VimL
set t_Co=256 " This is may or may not needed.

set background=light
colorscheme PaperColor
```

Or using the dark version:

```VimL
set background=dark
colorscheme PaperColor
```

To switch to dark or light variant during session: `:set background=dark` or `:set background=light`

To quickly toggle between them, use [vim-unimpaired](https://github.com/tpope/vim-unimpaired)'s keymap `cob`

*Optional*: turn on line numbers and status bar

```VimL
set number
set laststatus=2
```
# 🛠️ User Customization

This theme currently provides theme options and language-specific options. All config options can be stored in global variable `g:PaperColor_Theme_Options` which can be set in your `.vimrc`

**Note**:
+ This `g:PaperColor_Theme_Options` variable must be placed anywhere **before** `color PaperColor` command.
+ if the same option is provided in both a theme and a theme's variant, the value in the theme's variant options will take precedence.

### Theme Options

Within section `theme`, options for each theme can be specified under the theme name. The original PaperColor theme is `default`. For example:

```VimL
let g:PaperColor_Theme_Options = {
\ 'theme': {
\ 'default': {
\ 'transparent_background': 1
\ }
\ }
\ }
```

Or if you want to specify options only for a variant (dark or light) of a theme, you can specify using this pattern `[theme name].light` or `[theme name].dark`. For example:

```VimL
let g:PaperColor_Theme_Options = {
\ 'theme': {
\ 'default.dark': {
\ 'transparent_background': 1
\ }
\ }
\ }
```

**Color overriding**

You can override any color of the theme of interest. This example is for `default` theme (original PaperColor Theme), but you can specify any other theme that is registered.

The overriding setting is placed in `override` key of `g:PaperColor_Theme_Options` variable that you set in `.vimrc` like this.

```VimL
let g:PaperColor_Theme_Options = {
\ 'theme': {
\ 'default.dark': {
\ 'override' : {
\ 'color00' : ['#080808', '232'],
\ 'linenumber_bg' : ['#080808', '232']
\ }
\ }
\ }
\ }

```

See [DESIGN.md](https://github.com/NLKNguyen/papercolor-theme/blob/master/DESIGN.md) for more details and full list of color names.

#### Currently available theme options

option | value | default
------ | ------ | -------
`transparent_background` | 1: use terminal background | 0: use theme background
`allow_bold` | 1: use bold for certain text, 0: not at all | decided by the theme
`allow_italic` | 1: use italics for certain text, 0: not at all | decided by the theme
`override` | dictionary of color key-value |

### Language-specific options

In general, for each language, built-in functions and constants are not highlighted.
This is intentional; the vim syntax file often lags behind actual language development.
To override the default behavior, optionally place a language section in `g:PaperColor_Theme_Options`.
An example configuration is available below

```VimL
let g:PaperColor_Theme_Options = {
\ 'language': {
\ 'haskell': {
\ 'no_bold_types' : 1
\ },
\ 'python': {
\ 'highlight_builtins' : 1
\ },
\ 'cpp': {
\ 'highlight_standard_library': 1
\ },
\ 'c': {
\ 'highlight_builtins' : 1
\ }
\ }
\ }
```

#### Currently available language options

language | option | value | default
------ | ------ | ------ | ------
`c` | `highlight_builtins` | 1: enable | 0: disable
`cpp` | `highlight_standard_library` | 1: enable | 0: disable
`python` | `highlight_builtins` | 1: enable | 0: disable
`haskell` | `no_bold_types` | 1: enable | 0: disable

### Vim-airline support

![Vim-airline support](https://nlknguyen.files.wordpress.com/2015/05/gifrecord_2015-05-31_010251.gif)

To set [vim-airline](https://github.com/bling/vim-airline) theme:

```VimL
let g:airline_theme='papercolor'
```

Note: to be able to use this theme, it is also necessary to install [vim-airline-themes](https://github.com/vim-airline/vim-airline-themes)

To set [lightline](https://github.com/itchyny/lightline.vim) theme:

```VimL
let g:lightline = { 'colorscheme': 'PaperColor' }
```

# 📺 Screenshots

**Default Light**

![Sample Ruby code](https://nlknguyen.files.wordpress.com/2015/05/ruby1.png)

![Sample DTrace code](https://nlknguyen.files.wordpress.com/2015/05/dtrace1.png)

![Sample MySQL code](https://nlknguyen.files.wordpress.com/2015/05/mysql.png)

![Sample Assembly code](https://nlknguyen.files.wordpress.com/2015/05/asm.png)

![Sample Vimdiff w/ git tool](https://cloud.githubusercontent.com/assets/4667129/24315492/9410c372-10a4-11e7-84c7-8846984bdca0.png)

**Default Dark**

![Sample Ruby code](https://nlknguyen.files.wordpress.com/2015/05/ruby-dark.png)

![Sample Go code](https://nlknguyen.files.wordpress.com/2015/05/go-dark.png)

![Sample JavaScript code](https://nlknguyen.files.wordpress.com/2015/05/javascript-dark2.png)

![Sample C code](https://nlknguyen.files.wordpress.com/2015/05/c-dark-split.png)

![Sample Vimdiff w/ git tool](https://cloud.githubusercontent.com/assets/4667129/24315493/94122816-10a4-11e7-8d3f-f5d92a064a14.png)

*Have screenshots to contribute?* Use [this thread](https://github.com/NLKNguyen/papercolor-theme/issues/90) to upload images and get direct links to place here.

# 👋 Author

👤 **Nikyle Nguyen**


Twitter: NLKNguyen

* Website: https://dephony.com/Nikyle
* Twitter: [@NLKNguyen](https://twitter.com/NLKNguyen)
* Github: [@NLKNguyen](https://github.com/NLKNguyen)
* LinkedIn: [@NLKNguyen](https://linkedin.com/in/NLKNguyen)

# 🤝 Contributing

Give a ⭐️ if this color scheme helped you developing more comfortably!

Contributions, issues and feature requests are welcome! Feel free to check [issues page](https://github.com/NLKNguyen/papercolor-theme/issues).

## 🙇 Your support is very much appreciated

I create open-source projects on GitHub and continue to develop/maintain as they are helping others. You can integrate and use these projects in your applications for free! You are free to modify and redistribute anyway you like, even in commercial products.

I try to respond to users' feedback and feature requests as much as possible. Obviously, this takes a lot of time and efforts (speaking of mental context-switching between different projects and daily work). Therefore, if these projects help you in your work, and you want to encourage me to continue create, here are a few ways you can support me:

+ 💬 Following my blog and social profiles listed above to help me connect with your network
+ ⭐️ Starring this project and sharing with others as more users come, more great ideas arrive!
+ ☘️ Donating any amount is a great way to help me work on the projects more regularly!






Buy Me A Coffee





Thanks to all contributors who make PaperColor great! ❤️

***

## 🔮 Related projects based on PaperColor

[Material iTerm](https://github.com/stoeffel/material-iterm) theme by Christoph Hermann

[Material Terminator](https://github.com/marhs/material-terminator) (terminal emulator) theme by Marco Herrero

[Terminal Theme](https://www.reddit.com/r/vim/comments/36xzbs/vim_paper_color_theme_inspired_by_googles/crqbfpa) by Fixles

[PaperColor Light for iTerm2](https://github.com/aseom/dotfiles/blob/master/osx/iterm2/papercolor-light.itermcolors) by ASeom Han

[PaperColor for Terminal.app](https://github.com/tomotargz/papercolor-terminal-app) by tomotargz

[PaperColor Light for konsole](https://raw.githubusercontent.com/z2oh/dotfiles/82bf6835948674f0ed1f98a14b82975ff2dd8f3e/konsole/paperrlight.colorscheme) by [z2oh](https://github.com/z2oh)

[PaperColor Light for konsole](https://github.com/MaxG87/konsole-papercolor) (some palette collisions resolved) by [MaxG87](https://github.com/MaxG87)

[PaperColor Theme for Vis Editor](https://github.com/jceb/dotfiles/blob/master/config/vis/lexers/themes/papercolor.lua) by Jan Christoph Ebersbach

[Airline PaperColor Theme for Emacs Powerline](https://github.com/AnthonyDiGirolamo/airline-themes) by Anthony DiGirolamo

[Airline PaperColor Theme for Vim Lightline](https://github.com/itchyny/lightline.vim)

[Ninrod's `vim + tmux + zsh` dotfiles](https://github.com/ninrod/dotfiles.git) by [Filipe Silva](https://github.com/ninrod)

[PaperColor for Vscode](https://github.com/Rozbo/papercolor-vscode) by [rozbo](https://github.com/rozbo)

[PaperColor for Vscode Redux](https://github.com/mrworkman/papercolor-vscode-redux) by [mrworkman](https://github.com/mrworkman)

[PaperColor theme for Hyper](https://github.com/rafaelrinaldi/hyper-papercolor) by [Rafael Rinaldi](https://github.com/rafaelrinaldi)

[PaperColor Theme for kitty](https://github.com/craffate/papercolor-kitty) by [Cyril Raffatelli](https://github.com/craffate)

[PaperColor Light theme for several tools](https://github.com/stoerdebegga/papercolor-light-contrib) by [stoerdebegga](https://github.com/stoerdebegga)

[PaperColor Light theme for Alacritty](https://github.com/eendroroy/alacritty-theme/blob/master/themes/papercolor_light.yaml)

Feel free to send a PR to add related projects here!

***

# 📝 License

Copyright © 2015 - 2020 [Nikyle Nguyen](https://github.com/NLKNguyen)

The project is [MIT License](https://github.com/NLKNguyen/papercolor-theme/blob/master/LICENSE)