Skip to content

The dark color scheme for Emacs/Spacemacs. GUI and terminal support

Notifications You must be signed in to change notification settings

srcery-colors/srcery-emacs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/title.png https://melpa.org/packages/srcery-theme-badge.svg https://stable.melpa.org/packages/srcery-theme-badge.svg

Colorscheme with clearly defined contrasting colors and a slightly earthy tone.

Project status: Looking for contributers or maintainers

Project is no longer in active development, I plan to further support this theme with bugfixes and minor issues but no new additions will be added unless contributors/maintainers can be found. If you’d like to contribute, please introduce yourself on the maintainers wanted issue.

Requirements

Emacs 24 or above

GUI

Should work out of the box.

Terminal

To use Srcery in the terminal you need to change your terminal emulator’s so-called “ASCII” colors to the ones in the table below.

TERMCOLNRHEXRGB
black0#1C1B1928, 27, 25
red1#EF2F27239, 47, 39
green2#519F5081, 159, 80
yellow3#FBB829251, 184, 41
blue4#2C78BF44, 120, 191
magenta5#E02C6D224, 44, 109
cyan6#0AAEB310, 174, 179
white7#BAA67F186, 166, 127
bright-black8#918175145, 129, 117
brright-red9#F75341247, 83, 65
bright-green10#98BC37152, 188, 55
bright-yellow11#FED06E254, 208, 110
bright-blue12#68A8E4104, 168, 228
bright-magenta13#FF5C8F255, 92, 143
bright-cyan14#2BE4D043, 228, 208
bright-White15#FCE8C3252, 232, 195

See srcery-terminal repository for a list of terminal configs.

In addition to the table above Srcery uses a few unmodified xterm colors. Since most terminals have these defined it pads out the color selection nicely without over complicating things.

Make sure your $TERM supports 256 colors.

Installation

Package.el

Srcery is available from MELPA

M-x package-install RET srcery-theme

Then load it with

M-x load-theme srcery

Or add this to your init file:

(load-theme 'srcery t)

Spacemacs

Either install using package-install or add srcery-theme to dotspacemacs-additional-packages, then add srcery to dotspacemacs-themes

(setq-default
 dotspacemacs-additional-packages
 '(srcery-theme)
 dotspacemacs-themes
 '(srcery))

Doom Emacs

Include package in doom/packages.el

(package! srcery-theme)

Set theme in doom/config.el

(setq doom-theme 'srcery)

Run doom sync to install the package

Screenshots

Lisp

https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/emacs/lisp.png paren-face is used to color parenthesis.

Python / JavaScript

https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/emacs/py-js.png

Rust / Magit

https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/emacs/rs-magit.png

Org / C

https://raw.githubusercontent.com/srcery-colors/srcery-assets/master/emacs/org-c.png

Customization

Srcery has a couple of options that can be tweaked via M-x customize:

srcery-org-height

boolean, default: t

This toggles the use of varying org headings heights.

srcery-invert-matches

boolean, default: nil

Toggles whether to inverse-video search matches.

Make sure your cursor is inverted if this is enabled as otherwise it will make the cursor difficult to spot.

srcery-invert-region

boolean, default: t

Toggle inverse video for region

srcery-transparent-background

boolean, default nil

Sets the base background color to nil, and relies on underlying terminal background color. This only works in the terminal, and the idea behind it is that you can use for example tmux to control the background color.

Custom colors

Its possible to override the base srcery colors.

Possible colors are: srcery-black, srcery-red, srcery-green, srcery-yellow, srcery-blue, srcery-magenta, srcery-cyan, srcery-white srcery-bright-black, srcery-bright-red, srcery-bright-green, srcery-bright-yellow, srcery-bright-blue, srcery-bright-magenta, srcery-bright-cyan, srcery-bright-white srcery-orange, srcery-bright-orange, srcery-hard-black, srcery-gray-1, srcery-gray-2, srcery-gray-3, srcery-gray-4, srcery-gray-5.

Bear in mind that changing these will not work in termninal. Set your term colors to whatever you wish to override.

Supported modes

  • company
  • ein
  • erc
  • gnus
  • helm
  • ido
  • info
  • magit
  • mu4e
  • neotree
  • org
  • evil-snipe
  • paren-face
  • cider
  • dired
  • diredfl
  • flycheck
  • ivy
  • latex
  • powerline
  • spaceline
  • and others, more coming

Troubleshooting

Work in progress

This theme is a work in progress, if you see something that is off or doesn’t work please open an issue so it can be fixed.

org-bullets and transparent background

When setting the variable srcery-transparent-background and you are using org-bullets the leading asterisks are colored white, which does nothing to hide them. The problem is that org-bullets sets the :forground color to the default background color, but when this is nil this issue arise. I’ve made a fork that uses the org-hide face, fixing this issue. There is also an open pull request that addresses this.

Attribution

I’m new to elisp, so I used the spacemacs-theme as a base for emacs-srcery. Huge thanks to everyone involved with that theme, and Spacemacs itself. I also used Monokai Emacs as a blueprint for handling 256 colors properly. Big thanks to maintainers of that theme.