Function: set-foreground-color
set-foreground-color is an interactive and byte-compiled function
defined in frame.el.gz.
Signature
(set-foreground-color COLOR-NAME)
Documentation
Set the foreground color of the selected frame to COLOR-NAME.
When called interactively, prompt for the name of the color to use.
To get the frame's current foreground color, use frame-parameters.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/frame.el.gz
(defun set-foreground-color (color-name)
"Set the foreground color of the selected frame to COLOR-NAME.
When called interactively, prompt for the name of the color to use.
To get the frame's current foreground color, use `frame-parameters'."
(interactive (list (read-color "Foreground color: " nil nil nil t)))
(modify-frame-parameters (selected-frame)
(list (cons 'foreground-color color-name)))
(or window-system
(face-set-after-frame-default (selected-frame)
(list
(cons 'foreground-color color-name)
;; Pass the background-color as
;; well, if defined, to avoid
;; losing it when faces are reset
;; to their defaults.
(assq 'background-color
(frame-parameters))))))