• Stars
    star
    360
  • Rank 118,230 (Top 3 %)
  • Language
    Emacs Lisp
  • License
    MIT License
  • Created about 12 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Base16 themes for Emacs

https://stable.melpa.org/packages/base16-theme-badge.svg http://melpa.org/packages/base16-theme-badge.svg

Base16 themes for Emacs

Tinted Theming provides carefully chosen syntax highlighting and a default set of sixteen colors suitable for a wide range of applications. Tinted Theming is not a single theme but a set of guidelines with numerous implementations.

This repository contains the Emacs templates and MELPA. It can be built by using one of the builders listed on the main Tinted Theming page.

If you notice anything that looks strange or if this repo is missing any scheme updates, please feel free to open an issue or submit a pull request.

Installation

package.el

base16-theme is available in both MELPA stable and MELPA.

You can install it with the following command:

M-x package-install base16-theme

To load one of the themes on emacs startup, add this to your init file (replacing base16-default-dark with the name of the theme you want):

(load-theme 'base16-default-dark t)

use-package

The use-package block is fairly similar to package.el.

(use-package base16-theme
  :ensure t
  :config
  (load-theme 'base16-default-dark t))

Note that use-package tries to defer packages if at all possible, so you may need to add :demand to the use-package block.

Customizing

There are a number of options which can be used to customize the themes. Note that they need to be set before load-theme is called.

base16-distinct-fringe-background - Make the fringe background different from the normal background color. Also affects `linum-mode’ background. Defaults to true.

base16-highlight-mode-line - Make the active mode line stand out more. There are two choices for applying the emphasis: “box” draws a thin border around the active mode line; and “contrast” uses the default face’s foreground which should result in more contrast. Defaults to off (no special emphasis).”

Terminal Colors

When running emacs in a 256 color terminal, by default we assume you’re using a base16 compatible terminal theme and use the colors from that. However, if you’re using base16-shell or having trouble getting emacs to display with the correct colors it’s possible to override this using the base16-theme-256-color-source variable.

There are 3 possible values for this:

  • terminal: The default value - use the colors from a base16 compatible terminal theme.
  • base16-shell: Use the extended palate from base16-shell. This is useful for users of base16-shell.
  • colors: Use emacs to convert from the html color code to the closest color in the 256 color palate. This can sometimes fix issues with the other two modes, but if you’re using your own shell theme for the original 16 colors it can sometimes look strange.

Similar to other config values, make sure this is set before calling load-theme.

Previews

Theme previews can be found here.

It is recommended to generate screenshots by adding the gh-pages branch as a subtree (git worktree add -B gh-pages gh-pages origin/gh-pages) then using the normal generation tools (simply run screenshot.sh from the screenshots dir).

evil-mode

evil-mode doesn’t provide a way for themes to set the cursor color, so if you’re interested in matching the base16 spaceline indicator, you can use the following snippet:

;; Set the cursor color based on the evil state
(defvar my/base16-colors base16-default-dark-colors)
(setq evil-emacs-state-cursor   `(,(plist-get my/base16-colors :base0D) box)
      evil-insert-state-cursor  `(,(plist-get my/base16-colors :base0D) bar)
      evil-motion-state-cursor  `(,(plist-get my/base16-colors :base0E) box)
      evil-normal-state-cursor  `(,(plist-get my/base16-colors :base0B) box)
      evil-replace-state-cursor `(,(plist-get my/base16-colors :base08) bar)
      evil-visual-state-cursor  `(,(plist-get my/base16-colors :base09) box))

Development

Above, there’s a use-package block listed for general use, but if you want to run these themes out of the git repo, there’s a bit more work which needs to be done. I use something similar to the following:

(use-package base16-theme
  :ensure nil
  :load-path "site-lisp/base16-theme"
  :init
  (add-to-list 'custom-theme-load-path "~/.emacs.d/site-lisp/base16-theme/build")
  :config
  (load-theme 'base16-default-dark t))

This block assumes the repo is cloned to ~/.emacs.d/site-lisp/base16-theme. That needs to be added to the load path (along with specifying :ensure nil if needed so use-package doesn’t try to grab the package from melpa). Additionally, the build directory needs to be added to the custom-theme-load-path to ensure load-theme can find the themes.

Credits

Current maintainer: belak

Previous maintainers:

More Repositories

1

base16-termite

Mustache
233
star
2

base16-jetbrains

Base16 themes for Jetbrains IDE's (IntelliJ, PyCharm, Webstorm, etc) - and the Material Theme plugin
Mustache
215
star
3

base16-xfce4-terminal

Base16 template for xfce4-terminal
Mustache
202
star
4

base16-iterm2

Base16 for iTerm2
Mustache
184
star
5

base16-i3

Mustache
119
star
6

base16-fzf

base16 colorschemes for fzf
Shell
115
star
7

home

Style systems and smart build tooling for crafting high fidelity color schemes and easily using them in all your favorite apps.
106
star
8

base16-qutebrowser

base16 themes for qutebrowser
Python
82
star
9

base16-vim

base16-vim refreshes and commits new themes weekly automatically and has a documented build process.
Vim Script
80
star
10

base16-putty

Putty reg files for the base16 themes
Mustache
56
star
11

base16-builder-go

A base16 builder written in go, focused on convenience for template maintainers.
Go
46
star
12

base16-schemes

All the color schemes for use in base16 packages
44
star
13

base16-tmux

Base16 theme for tmux
Mustache
41
star
14

base16-rofi

Base16 for rofi
Mustache
35
star
15

base16-shell

Base16 for Shells
Shell
33
star
16

base16-dunst

Mustache
31
star
17

base16-vscode

Mustache
27
star
18

base24

Base24/ Base16 can be used to easily generate your favourite theme for your favourite application. Many of the template repositories provide theme files that you can copy/ import into said application.
Python
27
star
19

base16-conemu

ConEmu templates for base16 color scheme
Mustache
23
star
20

base16-shell-legacy

Base16 for Shells
Shell
22
star
21

base16-xresources

Base16 for Xresources
Mustache
20
star
22

base16-gtk-flatcolor

This is a Base16 template for FlatColor, a gtk3 theme by jasperro and deviantfero,
CSS
13
star
23

base16-builder-node

A Builder for schemes and templates. Supports Base16, Base24, etc.
JavaScript
11
star
24

base16-builder-ruby

A Ruby implementation of a Base16 builder
Ruby
11
star
25

base16-builder-elixir

An Elixir implementation of a Base16 builder.
Elixir
7
star
26

base16-gallery

HTML
6
star
27

base16-helix

base16 colors for helix
Mustache
6
star
28

base16-kakoune

Base16 themes for Kakoune
KakouneScript
5
star
29

base16-foot

base16 template for foot terminal
Mustache
5
star
30

base16-polybar

Base16 template for polybar
Mustache
2
star
31

base17

2
star
32

base16-hexchat

Base16 for HexChat (and XChat)
Mustache
2
star
33

base16-wob

Mustache
1
star