Function: htmlfontify-load-rgb-file
htmlfontify-load-rgb-file is an autoloaded, interactive and
byte-compiled function defined in hfy-cmap.el.gz.
Signature
(htmlfontify-load-rgb-file &optional FILE)
Documentation
Load an X11 style rgb.txt FILE.
Search hfy-rgb-load-path if FILE is not specified.
Loads the variable hfy-rgb-txt-color-map, which is used by
hfy-fallback-color-values.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/hfy-cmap.el.gz
;;;###autoload
(defun htmlfontify-load-rgb-file (&optional file)
"Load an X11 style rgb.txt FILE.
Search `hfy-rgb-load-path' if FILE is not specified.
Loads the variable `hfy-rgb-txt-color-map', which is used by
`hfy-fallback-color-values'."
(interactive
(list
(read-file-name "rgb.txt (equivalent) file: " "" nil t (hfy-rgb-file))))
(let ((rgb-buffer nil)
(rgb-txt (or file (hfy-rgb-file))))
(when (and rgb-txt
(file-readable-p rgb-txt))
(setq rgb-buffer (find-file-noselect rgb-txt 'nowarn))
(when-let ((result (hfy-cmap--parse-buffer rgb-buffer)))
(setq hfy-rgb-txt-color-map result))
(kill-buffer rgb-buffer))))