config.phundrak.com/docs/stumpwm/colours.org
Lucien Cartier-Tilet 87b3deeed3
All checks were successful
deploy / build (push) Successful in 2m27s
feat: restore sidebar's table of contents for nested pages
2024-01-28 09:06:40 +01:00

2.5 KiB
Raw Blame History

Colours

Colours

Colours

If youve had a look at the rest of my dotfiles, you may have noticed I really like the Nord theme. No wonder we can find it here again! Here is a small table listing the Nord colours:

Name Value
nord0 #2e3440
nord1 #3b4252
nord2 #434c5e
nord3 #4c566a
nord4 #d8dee9
nord5 #e5e9f0
nord6 #eceff4
nord7 #8fbcbb
nord8 #88c0d0
nord9 #81a1c1
nord10 #5e81ac
nord11 #bf616a
nord12 #d08770
nord13 #ebcb8b
nord14 #a3be8c
nord15 #b48ead
Nord Theme

Ill prefix the variables name with phundrak- just in case it might conflict with another package I might use in the future, so the CLisp code looks like so:

(mapconcat (lambda (color)
             (format "(defvar phundrak-%s \"%s\")" (car color) (cadr color)))
           colors
           "\n")
(defvar phundrak-nord0 "#2e3440")
(defvar phundrak-nord1 "#3b4252")
(defvar phundrak-nord2 "#434c5e")
(defvar phundrak-nord3 "#4c566a")
(defvar phundrak-nord4 "#d8dee9")
(defvar phundrak-nord5 "#e5e9f0")
(defvar phundrak-nord6 "#eceff4")
(defvar phundrak-nord7 "#8fbcbb")
(defvar phundrak-nord8 "#88c0d0")
(defvar phundrak-nord9 "#81a1c1")
(defvar phundrak-nord10 "#5e81ac")
(defvar phundrak-nord11 "#bf616a")
(defvar phundrak-nord12 "#d08770")
(defvar phundrak-nord13 "#ebcb8b")
(defvar phundrak-nord14 "#a3be8c")
(defvar phundrak-nord15 "#b48ead")

Finally, lets also modify the default colors StumpWM has. Ill try to respect the original colours while converting them to Nord. We also need to reload them now that we modified them.

(setq *colors*
      `(,phundrak-nord1   ;; 0 black
        ,phundrak-nord11  ;; 1 red
        ,phundrak-nord14  ;; 2 green
        ,phundrak-nord13  ;; 3 yellow
        ,phundrak-nord10  ;; 4 blue
        ,phundrak-nord14  ;; 5 magenta
        ,phundrak-nord8   ;; 6 cyan
        ,phundrak-nord5)) ;; 7 white

(when *initializing*
  (update-color-map (current-screen)))

And with that were done!