Skip to content
Ogden Webb edited this page Nov 20, 2019 · 43 revisions

kaolin-logo

Kaolin is a set of eye pleasing themes for GNU Emacs with support a large number of modes and external packages.
Kaolin themes are based on the pallete that was originally inspired by Sierra theme for vim with adding some extra colors.

This package includes the following themes

The screenshots above use Roboto Mono and D2 Coding fonts.

Configuration example

(require 'kaolin-themes)
(load-theme 'kaolin-dark t)
;; Apply treemacs customization for Kaolin themes, requires the all-the-icons package.
(kaolin-treemacs-theme)

;; Or if you have use-package installed
(use-package kaolin-themes
  :config
  (load-theme 'kaolin-dark t)
  (kaolin-treemacs-theme))                                         

Custom theme settings

;; The following set to t by default                               
(setq kaolin-themes-bold t       ; If nil, disable the bold style.        
      kaolin-themes-italic t     ; If nil, disable the italic style.      
      kaolin-themes-underline t) ; If nil, disable the underline style.

;; If you want to disable mode-line border, set kaolin-themes-modeline-border to nil
(setq kaolin-themes-modeline-border nil)
   
;; If you want to use flat underline style instead of wave 
;; set kaolin-themes-underline-wave to nil
(setq kaolin-themes-underline-wave nil)

;; If you want to use the same color for comments and metadata keys 
;; (e.g. for org-mode tags such as #+TITLE, #+STARTUP and etc)
;; you can disable kaolin-themes-distinct-metakeys.
(setq kaolin-themes-distinct-metakeys nil) 

Some extra themes features (disabled by default)

;; If t, enable italic style in comments.
(setq kaolin-themes-italic-comments t)
  
;; When t, will display colored hl-line style instead monochrome.     
(setq kaolin-themes-hl-line-colored t)       

;; Enable distinct background for fringe and line numbers.
(setq kaolin-themes-distinct-fringe t)  

;; Enable distinct colors for company popup scrollbar.
(setq kaolin-themes-distinct-company-scrollbar t)

;; Show git-gutter indicators as solid lines
(setq kaolin-themes-git-gutter-solid t) 

Alternative background

Some themes have a kaolin-theme name-alt-bg variable to enable alternative background, for example kaolin-ocean has kaolin-ocean-alt-bg for this. At this moment, Kaolin light themes as alt-bg use pure white color #FFFFFF.

Themes with support for alt-bg.

  • kaolin-galaxy
  • kaolin-valley-dark
  • kaolin-ocean
  • light themes: kaolin-valley-light and kaolin-light

If you want to enable alternative background, set it to t.

(setq kaolin-ocean-alt-bg t)

Treemacs theme

Kaolin-themes package provides own theme for treemacs based on all-the-icons. To enable it, you can put the following string inside your config.

(kaolin-treemacs-theme)

kaolin-treemacs

D2Coding font

Custom options

  • kaolin-themes-treemacs-hl-line - Remap hl-line face for treemacs, uses distinct foreground and default background, nil by default.
  • kaolin-themes-treemacs-icons - enable predefined icons from the all-the-icons pack, t by default.
  • kaolin-themes-treemacs-line-spacing - defines line-spacing for treemacs buffer, by default is 1.

Possible workarounds

If you see weird pos-tip faces, you have to manually specify background and foreground for this package in your config.

(setq pos-tip-background-color (face-background 'tooltip)
      pos-tip-foreground-color (face-foreground 'tooltip))

Face customization

You can change some faces via custom-theme-set-faces (put your theme name instead of kaolin-dark):

(custom-theme-set-faces
 'kaolin-dark
 '(default ((t (:background "#131b23" :foreground "#e6e6e8"))))
 '(font-lock-keyword-face ((t (:foreground "#f5c791")))))

Additional information about face options you can find in GNU Emacs Lisp Reference Manual on the Face Attributes page.

To find face name and its attributes under mouse cursor, you could use M-x describe-face.
Also you can call M-x customize-face - hit RET to customize the face at point

The end of the path is the beginning.