From 72817017fc2aaf483a3482b26d5741610c9339eb Mon Sep 17 00:00:00 2001 From: John Kitchin Date: Sun, 3 Oct 2021 11:31:31 -0400 Subject: [PATCH] fix minor issue in how colors are calculated for export --- scimax-editmarks.org | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scimax-editmarks.org b/scimax-editmarks.org index 70429adb..ee58693d 100644 --- a/scimax-editmarks.org +++ b/scimax-editmarks.org @@ -727,13 +727,14 @@ we go with the font color." (fg-color (or (plist-get (get-text-property (point) 'face) :foreground) "black")) (bg-color (plist-get (get-text-property (point) 'face) :background)) (fg-rgb (color-name-to-rgb fg-color)) - (fg-hex (apply 'color-rgb-to-hex fg-rgb)) + ;; the append (2) makes it use 24-bit color I think + (fg-hex (apply 'color-rgb-to-hex (append fg-rgb '(2)))) bg-rgb ;; this is white (bg-hex "#ffffff")) (when bg-color (setq bg-rgb (color-name-to-rgb bg-color) - bg-hex (apply 'color-rgb-to-hex bg-rgb))) + bg-hex (apply 'color-rgb-to-hex (append bg-rgb '(2))))) (cond ((eq 'latex backend) @@ -763,12 +764,12 @@ we go with the font color." (mapconcat (lambda (s) (format "@@html:%s@@" - fg-hex bg-hex s)) + fg-hex + bg-hex + s)) (s-split "\n" (buffer-substring-no-properties (car content-bounds) (cdr content-bounds))) "@@html:
@@")))))) - - #+END_SRC #+RESULTS: