Humus numericus

Aller au contenu | Aller au menu | Aller à la recherche

R, Spip et autres

Updated tangotango emacs color theme

EDIT : This post is now quite deprecated. Installation instructions and new versions are posted on the github project page.

I just updated my original ”tangotango” emacs color theme, based on the tango palette colors. I’ve tweaked some details and moved the source code to github. Here are updated installation instructions and screenshots :

Installation instructions

  1. Download and install the color-theme emacs package either via your linux distribution or via the source tarball
  2. Download and install color-theme-tangotango.el from github
  3. Make sure that both color-theme.el and color-theme-tangotango.el are in your load path

There are several ways to load the tangotango color theme from your .emacs, as documented on emacswiki. The way I currently use should work for a daemonized emacs and allows the selection of different themes for GUI or console based frames :

(require 'color-theme)
(setq color-theme-load-all-themes nil)

(require 'color-theme-tangotango)

;; select theme - first list element is for windowing system, second is for console/terminal
;; Source :
(setq color-theme-choices 
      '(color-theme-tangotango color-theme-tangotango))

;; default-start
(funcall (lambda (cols)
    	   (let ((color-theme-is-global nil))
    	      (append '(if (window-system))
    		      (mapcar (lambda (x) (cons x nil)) 

;; test for each additional frame or console
(require 'cl)
(fset 'test-win-sys 
      (funcall (lambda (cols)
    		 (lexical-let ((cols cols))
    		   (lambda (frame)
    		     (let ((color-theme-is-global nil))
		       ;; must be current for local ctheme
		       (select-frame frame)
		       ;; test winsystem
			(append '(if (window-system frame)) 
				(mapcar (lambda (x) (cons x nil)) 
    	       color-theme-choices ))
;; hook on after-make-frame-functions
(add-hook 'after-make-frame-functions 'test-win-sys)


Note that I also had to add a (color-theme-tangotango) line at the end of my .gnus file in order to apply the color theme to Gnus.


Here is a screenshot of the color theme with an emacs-lisp file :


One with a Gnus summary and article buffers :


And one with an org-mode buffer :



1. Le lundi 12 juillet 2010, 20:01 par Gary N

Thanks, I actually like this theme. I think I'll replace my current one with yours

2. Le jeudi 5 août 2010, 17:29 par ramji

Lovely theme - tangotango. Thanks for such a pleasing

What window theme is used in the screenshots ?
The blue scroll-bar and everything makes it look all the more better. And may I also know the font that you've used in these screenshots ?

3. Le jeudi 5 août 2010, 20:55 par Juba

Thanks for your comment !

As for the theme, it is the NOX GTK theme, from the murrine engine :

I found it quite nice but it has some glitches (black text on dark background for some widgets, this kind of things).

The font is a very classical (on linux) DevaVu Sans Mono.

4. Le jeudi 17 février 2011, 09:46 par Joseph Vidal-Rosset

Many thanks for the very beautiful and useful theme. It is really the best in my point of view !


5. Le lundi 28 février 2011, 22:03 par Rene Zurita

Hi, this color theme is REALLY GOOD, I installed it couple months ago but recently I can't load it since an upgrade made for emacs 23 in Ubuntu, do you have any suggestion on how to fix it?, thanks any how for the theme, great work.

6. Le samedi 5 mars 2011, 01:38 par Juba

Thanks for your positive feedback !

what is the problem exactly with emacs 23 ? Do you have a backtrace or an error message ?

7. Le jeudi 22 septembre 2011, 11:56 par Josh

Nice theme! I don't seem to be able to see text under the point however; it doesn't change to a dark color. Any ideas why? Sample screenshot:

8. Le vendredi 23 septembre 2011, 09:51 par Juba

Hi Josh,

And thanks a lot for your feedback. I didn't notice this issue because the foreground cursor color was dark on my system. I just commited a fix to correct this :

Feel free to try it and tell me if this doesn't work !


9. Le samedi 24 septembre 2011, 07:47 par Josh

I've spoken with some people on the emacs irc channel, and apparently the cursor is controlled by the operating system. Under OSX, the foreground color cannot be changed. So the only choice is to make the cursor background color something more neutral, which I've done for my purposes. Thanks for your help anyways!

10. Le vendredi 30 septembre 2011, 09:54 par Josh

Just a quick note. The cursor colors function correctly with gnu emacs for osx v24, so they appear to have fixed whatever prevented it working with earlier versions.

11. Le vendredi 7 octobre 2011, 11:27 par Hello

What font are you using on the screens please ?

12. Le vendredi 7 octobre 2011, 14:40 par Juba

The font is DejaVu Sans Mono.

13. Le jeudi 17 novembre 2011, 17:11 par George

Thanks very much for the theme! I've been using it for over a year now and I have no intentions to switch.

14. Le jeudi 9 février 2012, 08:14 par Admirer

This theme rocks! Thanks a lot for it :)

15. Le samedi 7 juillet 2012, 16:57 par Kapil Tekwani

Hi guys,
I have download color-theme.el and color-theme-tangotango.el and also create init.el in .emacs.d folder of emacs24. I dont know how to use color-theme.el and color-theme-tango.el???

I am beginner in using emacs and i am using emacs snapshot.
Can anyone describe it in a little more detail??

Thanks in advance

16. Le samedi 1 septembre 2012, 22:52 par Mikael

Same problem here as Tewkani #15... can theme creator help?

17. Le samedi 1 septembre 2012, 23:03 par Mikael

Tewkani make this your init.el file:

(setq load-path (cons "~/.emacs.d/color-theme/themes" load-path))
(require 'color-theme-tangotango)

Create the folder ~/.emacs.d/color-theme/themes and put color-theme-tangotango.el in it. It should work.

18. Le mercredi 28 novembre 2012, 11:44 par kodx

I've made a mod for this theme.
I have renamed all char vars to it's hex for portability reasons and changed few colors. You can find my version in my emacs config
link to theme file