               ([face-name property]
                (let [face-name-emacs (face-to-emacs face-name)
                      face            (get faces-by-name face-name)
-                     face-color-id   (last (:face/color face))
-                     fg-rgb          (pr-str (get-in colors-by-id [face-color-id :color/rgb]))]
+                     fg-color-id     (last (:face/color-fg face))
+                     bg-color-id     (last (:face/color-bg face))
+                     fg-rgb          (pr-str (get-in colors-by-id [fg-color-id :color/rgb]))
+                     bg-rgb          (pr-str (get-in colors-by-id [bg-color-id :color/rgb]))]
                  ;; TODO This is gross because cljs doesn't support interning
                  ;; Need to cleanup
                  (if (= face-name "default")

        (str "font-lock-" face-name "-face")))

(defn emacs-theme [name faces-by-name colors-by-id]
  ;;'(font-lock-warning-face ((t (:foreground "yellow"))))
  (let [doc    (pr-str "A theme created with Koeeoadi")
        bg-rgb (pr-str (let [[_ color-id] (get-in faces-by-name ["background" :face/color])]
                         (get-in colors-by-id [color-id :color/rgb])))]

(ns koeeoadi.themebuilder
  (:require [koeeoadi.reconciler :refer [reconciler]]
            [cljs.pprint :as pprint]
            [cljs.reader :as reader]))

(defn face-to-emacs [face-name]
  (cond (= face-name "default")
