#+title: myron-themes previews #+filetags: :tarp:emacs:gui:theme:previews: #+pubdate: <2021-01-19> This page shows previews of the [[https://github.com/neeasade/myron-themes][myron-themes]] colorschemes for emacs. The readme there has more details. #+BEGIN_SRC elisp :results raw :exports results ;; this is write-once code ;; sorry future me ;; ... (defun myron-cache-get (theme-name label &optional emphasis) (llet [theme (plist-get myron-themes-cache theme-name)] (or (ht-get* theme (or emphasis :normal) label) (when (not emphasis) (ht-get* theme :meta label))))) (s-join "\n" (llet [themes (ns/plist-keys myron-themes-cache)] (-map (lambda (theme) (format " ,** %s ,#+begin_export html
Colors ,#+end_export %s ,#+begin_export html
%s ,#+end_export " theme (s-join "\n" `("| _ | :normal | :weak | :strong | :focused |" ,@(-map (lambda (fg-type) (format "| %s | %s |" fg-type (s-join " | " (-map (lambda (bg-type) (ns/blog-make-color-preview (myron-cache-get theme fg-type bg-type))) '(:normal :weak :strong :focused))))) '(:background :foreground :faded :primary :assumed :alt :strings)))) (ns/mustache (slurp (ns/blog-path "extra/fizzbuzz.html")) (ht-merge (ht-get (plist-get myron-themes-cache theme) :normal) (-ht :focused (ht-get* (plist-get myron-themes-cache theme) :focused :background)))) )) themes))) #+end_src