Function: css--hex-alpha

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

Signature

(css--hex-alpha HEX)

Documentation

Return the alpha component of CSS color HEX.

HEX can either be in the #RGBA or #RRGGBBAA format. Return nil if the color doesn't have an alpha component.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/css-mode.el.gz
(defun css--hex-alpha (hex)
  "Return the alpha component of CSS color HEX.
HEX can either be in the #RGBA or #RRGGBBAA format.  Return nil
if the color doesn't have an alpha component."
  (cl-case (length hex)
    (5 (string (elt hex 4)))
    (9 (substring hex 7 9))))