Copyright (C) 2000-2012 |
GNU Info (emacs-lisp-intro.info)X11 ColorsX11 Colors ========== You can specify colors when you use Emacs with the MIT X Windowing system. I dislike the default colors and specify my own. Here are the expressions in my `.emacs' file that set values: ;; Set cursor color (set-cursor-color "white") ;; Set mouse color (set-mouse-color "white") ;; Set foreground and background (set-foreground-color "white") (set-background-color "darkblue") ;;; Set highlighting colors for isearch and drag (set-face-foreground 'highlight "white") (set-face-background 'highlight "blue") (set-face-foreground 'region "cyan") (set-face-background 'region "blue") (set-face-foreground 'secondary-selection "skyblue") (set-face-background 'secondary-selection "darkblue") ;; Set calendar highlighting colors (setq calendar-load-hook '(lambda () (set-face-foreground 'diary-face "skyblue") (set-face-background 'holiday-face "slate blue") (set-face-foreground 'holiday-face "white"))) The various shades of blue soothe my eye and prevent me from seeing the screen flicker. Alternatively, I could have set my specifications in various X initialization files. For example, I could set the foreground, background, cursor, and pointer (i.e., mouse) colors in my `~/.Xresources' file like this: Emacs*foreground: white Emacs*background: darkblue Emacs*cursorColor: white Emacs*pointerColor: white In any event, since it is not part of Emacs, I set the root color of my X window in my `~/.xinitrc' file, like this(1): # I use TWM for window manager. xsetroot -solid Navy -fg white & ---------- Footnotes ---------- (1) I occasionally run more modern window managers, such as Sawfish with GNOME, Enlightenment, SCWM, or KDE; in those cases, I often specify an image rather than a plain color. automatically generated by info2www version 1.2.2.9 |