Skip to content

Lambda-Emacs/lambda-themes

Repository files navigation

Buy Me A Coffee

Aims of Theme

Lambda-themes is a collection of four higher and lower contrast light and dark themes. The color palette is limited, and organized according to function and salience. Here I largely agree with Nicolas Rougier that attentional constraints matter when thinking about the color palette. Lambda-themes tries to use color in a way to provide for a reasonable compromise between aesthetics and readability.

In general the theme aims to use as few highly distinct colors as possible without crossing over into full “monochrome” territory. It also means that the themes use various devices other than foreground face color to capture meaningful differences in text. Different text weights are used throughout, as are subtle differences in background coloring. Colored headlines are largely avoided.

Screenshots

Splash

Colors

Note that I use SF Mono for my font here, and rainbow-delimiters to colorize parens. The mode-line/status-line is from lambda-line.

Installation

Lambda-themes is not yet on MELPA. In the meantime to use this package you’ll have to clone or otherwise download the repo and put it into your load path. Here’s a basic way of setting it up using use-package and straight.

(use-package lambda-themes
  :straight (:type git :host github :repo "lambda-emacs/lambda-themes") 
  :custom
  (lambda-themes-set-italic-comments t)
  (lambda-themes-set-italic-keywords t)
  (lambda-themes-set-variable-pitch t) 
  :config
  ;; load preferred theme 
  (load-theme 'lambda-light))

Options

See M-x customize-group lambda-themes for the full list of options.

  • Set evil-cursor colors
  • Set italic comments or keywords
  • Set use of variable pitch in headlines, etc.
  • Set a custom color palette.

Color Palettes

Lambda-themes exports the color palette for each theme variant as constants, allowing you to use the theme colors in your own customizations. The following palettes are available:

  • lambda-themes-dark-palette - Dark theme colors
  • lambda-themes-dark-faded-palette - Dark faded theme colors
  • lambda-themes-light-palette - Light theme colors
  • lambda-themes-light-faded-palette - Light faded theme colors

Each palette is an association list with color names mapped to hex values:

;; Example: Get the background color from the dark theme
(alist-get 'bg lambda-themes-dark-palette)  ; => "#141414"

;; Example: Use theme colors in your own face customization
(set-face-attribute 'some-face nil
                    :foreground (alist-get 'focus lambda-themes-light-palette)
                    :background (alist-get 'highlight lambda-themes-light-palette))

;; Example: Create a custom face using theme colors
(defface my-custom-face
  `((((background dark))
     :foreground ,(alist-get 'crucial lambda-themes-dark-palette)
     :background ,(alist-get 'ultralight lambda-themes-dark-palette))
    (((background light))
     :foreground ,(alist-get 'crucial lambda-themes-light-palette)
     :background ,(alist-get 'highlight lambda-themes-light-palette)))
  "My custom face using lambda-themes colors.")

Available color keys in each palette:

  • fg, bg - Foreground and background colors
  • ultralight, highlight, lowlight - Background variants
  • urgent, crucial, focus - Accent colors
  • default, salient, faded - Text variants
  • error, warning, success - Status colors
  • And more specialized colors for UI elements

Recent Changes

Fixed Issues

  • Issue #12: Variable pitch setting now properly updates when changed. The lambda-themes-set-variable-pitch customization variable includes a custom setter that automatically reloads the active theme when its value changes, ensuring that disabling variable pitch takes effect immediately.

New Features

  • Issue #7: Color palettes are now exported and documented for all theme variants, allowing users to access theme colors for custom face definitions and other customizations.

Acknowledgments

About

A set of four light and dark themes for Emacs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published