Highlight the active modeline using colours from modus-themes

| emacs

I wanted to experiment with for colouring the mode line of the active window ever so slightly different to make it easier to see where the active window is. I usually have global-hl-line-mode turned on, so that highlight is another indicator, but let's see how this tweak feels. I modified the code so that it uses the theme colours from the currently-selected Modus themes, since I trust Prot's colour choices more than I trust mine. Thanks to Irreal for sharing Ignacio's comment!

(defun my-update-active-mode-line-colors ()
  (set-face-attribute
   'mode-line nil
   :foreground (modus-themes-get-color-value 'fg-mode-line-active)
   :background (modus-themes-get-color-value 'bg-blue-subtle)
   :box '(:line-width
          1
          :color
          (modus-themes-get-color-value 'border-mode-line-active))))
(use-package modus-themes
  :hook
  (modus-themes-after-load-theme . my-update-active-mode-line-colors))
dark-mode-line.svg
Figure 1: with dark mode
light-mode-line.svg
Figure 2: with light mode
This is part of my Emacs configuration.
You can comment with Disqus or you can e-mail me at sacha@sachachua.com.