diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 4d9632035..eaa601ad8 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -704,8 +704,6 @@ This constant, for example, makes the below code not err: 'org-latex-color-format 'org-latex-preview--format-color "9.7") (define-obsolete-function-alias 'org-latex-color 'org-latex-preview--attr-color "9.7") -(define-obsolete-function-alias - 'org-normalize-color 'org-latex-preview--normalize-color "9.7") ;; MathML related functions from org-latex-preview.el (define-obsolete-variable-alias 'org-latex-to-mathml-jar-file 'org-mathml-converter-jar-file "9.7") @@ -760,6 +758,12 @@ This constant, for example, makes the below code not err: (make-obsolete 'org-dvipng-color-format "to be removed" "9.7") +;; FIXME: Unused; obsoleted; to be removed. +(defun org-normalize-color (value) + "Return string to be used as color value for an RGB component." + (format "%g" (/ value 65535.0))) +(make-obsolete 'org-normalize-color "to be removed" "9.7") + ;; FIXME: Unused; obsoleted; to be removed. (defcustom org-preview-latex-image-directory "ltximg/" "Path to store latex preview images. diff --git a/lisp/org-latex-preview.el b/lisp/org-latex-preview.el index 6b6349133..07d712bd2 100644 --- a/lisp/org-latex-preview.el +++ b/lisp/org-latex-preview.el @@ -2397,14 +2397,11 @@ used it can be worth storing the results to avoid re-computing.") "Convert COLOR-NAME to a RGB color value." (or (alist-get color-name org-latex-preview--format-color-cache nil nil #'equal) (cdar (push (cons color-name - (apply #'format "%s,%s,%s" - (mapcar 'org-latex-preview--normalize-color - (color-values color-name)))) + (apply #'format "%.3f,%.3f,%.3f" + (mapcar + (lambda (v) (/ v 65535.0)) + (color-values color-name)))) org-latex-preview--format-color-cache)))) -(defun org-latex-preview--normalize-color (value) - "Return string to be used as color value for an RGB component." - (format "%g" (/ value 65535.0))) - (provide 'org-latex-preview) ;;; org-latex-preview.el ends here