Function: css--hex-color

css--hex-color is a byte-compiled function defined in css-mode.el.gz.

Signature

(css--hex-color STR)

Documentation

Convert a CSS hex color to an Emacs hex color.

STR is the incoming CSS hex color. This function simply drops any transparency.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/css-mode.el.gz
(defun css--hex-color (str)
  "Convert a CSS hex color to an Emacs hex color.
STR is the incoming CSS hex color.
This function simply drops any transparency."
  ;; Either #RGB or #RRGGBB, drop the "A" or "AA".
  (substring str 0 (if (> (length str) 5) 7 4)))