One of my favorite parts of Org-mode is the customizable colored headers; personally, it makes me extremely motivated to work and makes Org-mode so much more beautiful. Here's a quick script I made to make changing those colors easier, and hopefully, someone finds this helpful!

  1. First, generate a palette you like from this color palette generator: https://coolors.co
  2. Copy the RGB color codes, separated by hyphens, from the url
  3. Paste it into the list in the same format as I have in the below code snippet
  4. Copy the code into your init file somewhere

Essentially, the code splits the string into a list of codes, then the face attributes set the org header colors to the corresponding list colors.

I'd like to turn this into a package one day, but that's a project for another time (or if someone wants to help me, I'd love to work with them). And finally, if anyone uses this, drop your color palettes below!

 (defun col-strip (col-str) (butlast (split-string (mapconcat (lambda (x) (concat "#" x " ")) (split-string col-str "-") "") " "))) (setq color-schemes (list (col-strip "a21d1d-5497de-8e35b7-ffff5b-56cb7d-df5252-707efa") ; red blue purple study (col-strip "2278bf-e15554-3bb273-507c6d-6e5775-598d91-7768ae") ; blue red green okay )) (setq pick-color 0) (setq color-theme (nth pick-color color-schemes)) (set-face-attribute 'org-level-1 nil :height 1.3 :foreground (nth 0 color-theme)) (set-face-attribute 'org-level-2 nil :height 1.2 :foreground (nth 1 color-theme)) (set-face-attribute 'org-level-3 nil :height 1.1 :foreground (nth 2 color-theme)) (set-face-attribute 'org-level-4 nil :height 1.05 :foreground (nth 3 color-theme)) (set-face-attribute 'org-level-5 nil :foreground (nth 4 color-theme)) (set-face-attribute 'org-level-6 nil :foreground (nth 5 color-theme)) 
submitted by /u/Pr0Thr0waway
[link] [comments]