Skip to content

DIY Make the active mode line colorful

This is one of our practical examples to override the semantic colors of the Modus themes (Stylistic variants using palette overrides). Here we show some snippets that apply different stylistic variants. Of course, it is possible to use theme-specific overrides to, say, have a blue mode line for modus-operandi and a red one for modus-vivendi.

Make the mode line borderless.

Add padding to mode line.

emacs-lisp
;; Blue background, neutral foreground, intense blue border
(setq modus-themes-common-palette-overrides
      '((bg-mode-line-active bg-blue-intense)
        (fg-mode-line-active fg-main)
        (border-mode-line-active blue-intense)))

;; Subtle blue background, neutral foreground, intense blue border
(setq modus-themes-common-palette-overrides
      '((bg-mode-line-active bg-blue-subtle)
        (fg-mode-line-active fg-main)
        (border-mode-line-active blue-intense)))

;; Sage (green/cyan) background, neutral foreground, slightly distinct green border
(setq modus-themes-common-palette-overrides
      '((bg-mode-line-active bg-sage)
        (fg-mode-line-active fg-main)
        (border-mode-line-active bg-green-intense)))

;; As above, but with a purple style
(setq modus-themes-common-palette-overrides
      '((bg-mode-line-active bg-lavender)
        (fg-mode-line-active fg-main)
        (border-mode-line-active bg-magenta-intense)))

;; As above, but with an earthly style
(setq modus-themes-common-palette-overrides
      '((bg-mode-line-active bg-ochre)
        (fg-mode-line-active fg-main)
        (border-mode-line-active bg-yellow-intense)))

Reload the theme for changes to take effect.