diff --git a/lisp/my/my.el b/lisp/my/my.el index 6ba908cb..8e8a5ea6 100644 --- a/lisp/my/my.el +++ b/lisp/my/my.el @@ -549,6 +549,23 @@ Example usage r g b (or description color))) (format "No Color RGB for %s" color)))) + ;; text :raw-html:`foo` baz + ;; need in Sphinx conf.py rst_prolog = """ + ;; .. role:: raw-html(raw) + ;; :format: html + ;; """ + ((eq backend 'rst) + (let ((rgb (color-name-to-rgb color)) + r g b) + (if rgb + (progn + (setq r (truncate (* 255 (nth 0 rgb)))) + (setq g (truncate (* 255 (nth 1 rgb)))) + (setq b (truncate (* 255 (nth 2 rgb)))) + (format ":raw-html:`%s`" + r g b + (or description color))) + (format "No Color RGB for %s" color)))) ((eq backend 'latex) (let ((rgb (color-name-to-rgb color))) (if rgb