Function: preview-get-colors

preview-get-colors is a byte-compiled function defined in preview.el.

Signature

(preview-get-colors)

Documentation

Return colors from the current display.

Fetches the current screen colors and makes a vector of colors as numbers in the range 0..65535. Pure borderless black-on-white will return triple nil. The fourth value is the transparent border thickness.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/preview.el
(defun preview-get-colors ()
  "Return colors from the current display.
Fetches the current screen colors and makes a vector
of colors as numbers in the range 0..65535.
Pure borderless black-on-white will return triple nil.
The fourth value is the transparent border thickness."
  (let
      ((bg (color-values (preview-inherited-face-attribute
                          'preview-reference-face :background 'default)))
       (fg (color-values (preview-inherited-face-attribute
                          'preview-reference-face :foreground 'default)))
       (mask (preview-get-heuristic-mask)))
    (if (equal '(65535 65535 65535) bg)
        (setq bg nil))
    (if (equal '(0 0 0) fg)
        (setq fg nil))
    (unless (and (numberp preview-transparent-border)
                 (consp mask) (integerp (car mask)))
      (setq mask nil))
    (vector bg fg mask preview-transparent-border)))