;;; petrol-theme.el --- A light colored theme -*- lexical-binding: t -*- ;; Copyright (C) 2020 Paul Provost ;; Author: Paul Provost ;; Maintainer: Paul Provost ;; Keywords: color theme ;; Package-Version: 2020mmdd.xxxx ;; URL: https://github.com/paulprovost/petrol-theme ;; Version: 0.1 ;; Package: petrol-theme ;; Package-Requires: ((emacs "24")) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;; This file is NOT part of GNU Emacs ;;; Commentary: ;; To use it, put the following in your Emacs configuration file: ;; ;; (use-package petrol-theme ;; :ensure t ;; :config ;; (load-theme 'petrol t)) ;; ;;; Code: (defgroup petrol nil "Petrol theme options." :group 'faces) (deftheme petrol "Petrol light color theme.") (let* ((class '((class color) (min-colors 89))) ;;,-------------------- ;;| General variables. ;;`-------------------- (petrol-line-numbers-height (- (face-attribute 'default :height) 10)) ;;,----------------- ;;| Generic colors. ;;`----------------- (petrol-fg "#454545") (petrol-bg "#f6f6ed") (petrol-blue "#2f7e9d") (petrol-orange "#cc6d00") (petrol-purple "#6c4ca8") (petrol-red "#d0372d") ;;,------------------ ;;| Specific colors. ;;`------------------ (petrol-line-numbers-bg "#eaeae1") ;;,-------------------------- ;;| Specific face fragments. ;;`-------------------------- (petrol-link `(:weight normal :foreground ,petrol-blue)) (petrol-link-visited `(:weight normal :foreground ,petrol-purple)) ) (custom-theme-set-faces 'petrol `(default ((,class (:background ,petrol-bg :foreground ,petrol-fg)))) `(cursor ((,class (:background "#00638a" :foreground "#f2f2f2" )))) `(fringe ((,class (:background ,petrol-line-numbers-bg :foreground ,petrol-fg)))) `(border ((,class (:foreground ,petrol-blue)))) `(vertical-border ((,class (:foreground ,petrol-blue)))) `(highlight ((,class (:background "#fffbc4")))) `(region ((,class (:background "#3389ab" :foreground "#f2f2f2")))) `(secondary-selection ((,class (:background "#fffbc4")))) `(isearch ((,class (:foreground "#f2f2f2" :background "#008abd")))) `(isearch-fail ((,class (:foreground "#f2f2f2" :background "#d0372d")))) `(query-replace ((,class (:inherit isearch)))) `(lazy-highlight ((,class (:foreground "#454545" :background "#fffbc4")))) ; Isearch others (see `match'). `(hl-line ((,class (:background "#ededed")))) `(shadow ((,class ((:foreground "#cccccc"))))) `(match ((,class (:background "#fffbc4")))) `(show-paren-match ((,class (:background "#cccccc" :foreground ,petrol-blue)))) `(show-paren-mismatch ((,class (:background "#cccccc" :foreground "#d0372d")))) `(trailing-whitespace ((,class (:foreground "#cccccc" :background "#fffbc4")))) `(button ((,class (:foreground ,petrol-blue)))) `(help-argument-name ((,class (:foreground ,petrol-blue)))) `(info-menu-star ((,class (:foreground ,petrol-blue)))) `(next-error ((,class (:inherit error)))) `(nobreak-space ((,class (:background "#b48cff")))) `(file-name-shadow ((,class (:foreground "#cccccc")))) `(line-number ((,class (:background ,petrol-line-numbers-bg :foreground "#8c8c8c" :height ,petrol-line-numbers-height )))) `(line-number-current-line ((,class (:background ,petrol-line-numbers-bg :foreground "#cc6d00" :height ,petrol-line-numbers-height )))) `(linum ((,class (:background "#f2f2f2" :foreground "#8c8c8c")))) `(linum-highlight-face ((,class (:background "#f2f2f2" :foreground "#8c8c8c")))) `(font-lock-builtin-face ((,class (:foreground ,petrol-purple)))) `(font-lock-comment-delimiter-face ((,class (:weight normal :foreground "#919aa1")))) `(font-lock-comment-face ((,class (:weight normal :foreground "#919aa1")))) `(font-lock-constant-face ((,class (:foreground "#008080")))) `(font-lock-doc-face ((,class (:weight normal :foreground "#678f03")))) `(font-lock-function-name-face ((,class (:foreground "#454545")))) `(font-lock-keyword-face ((,class (:foreground "#00638a")))) `(font-lock-preprocessor-face ((,class (:foreground ,petrol-purple)))) `(font-lock-regexp-grouping-backslash ((,class (:inherit nil)))) `(font-lock-regexp-grouping-construct ((,class (:inherit nil)))) `(font-lock-string-face ((,class (:foreground "#678f03")))) `(font-lock-type-face ((,class (:foreground "#008abd")))) `(font-lock-variable-name-face ((,class (:weight normal :foreground "#454545")))) `(font-lock-warning-face ((,class (:foreground "#cc6d00")))) `(mode-line ((,class (:background ,petrol-blue :foreground "#f2f2f2" :box (:line-width 5 :color ,petrol-blue) ) )) ) `(mode-line-inactive ((,class (:background "#1c4a5c" :foreground "#f2f2f2" :box (:line-width 5 :color "#1c4a5c") ) )) ) `(mode-line-buffer-id ((,class (:weight bold)))) `(mode-line-emphasis ((,class (:foreground "#f2f2f2")))) `(mode-line-highlight ((,class (:background "#fffbc4" :foreground "#454545")))) `(header-line ((,class (:background ,petrol-blue :foreground "#f2f2f2" :box (:line-width 1 :color ,petrol-blue))))) `(header-line-highlight ((,class (:background "#fffbc4" :foreground "#454545")))) `(error ((,class (:foreground "#d0372d")))) `(warning ((,class (:foreground "#cc6d00")))) `(success ((,class (:foreground "#2e994c")))) `(minibuffer-prompt ((,class (:foreground ,petrol-blue)))) `(minibuffer-noticeable-prompt ((,class (:foreground ,petrol-blue)))) `(escape-glyph ((,class (:foreground "#b48cff")))) `(whitespace-hspace ((,class (:foreground "#cccccc")))) `(whitespace-indentation ((,class (:background nil :foreground "#454545")))) `(whitespace-line ((,class (:foreground "#e67373" :background "#f2f2f2")))) `(whitespace-tab ((,class (:background nil :foreground "#454545")))) `(whitespace-trailing ((,class (:background nil :foreground "#e67373")))) `(window-divider ((,class (:background ,petrol-blue)))) `(window-divider-first-pixel ((,class (:background ,petrol-blue)))) `(window-divider-last-pixel ((,class (:background ,petrol-blue)))) `(link ((,class ,petrol-link))) `(link-visited ((,class ,petrol-link-visited))) `(dired-header ((,class (:foreground ,petrol-blue :background "#f2f2f2")))) `(dired-directory ((,class (:foreground ,petrol-blue :background "#f2f2f2")))) `(dired-ignored ((,class (:strike-through t :foreground "#d0372d")))) `(dired-mark ((,class (:foreground "#d0372d" :background "#f2f2f2")))) `(dired-marked ((,class (:foreground "#d0372d" :background "#ffdddd")))) `(dired-symlink ((,class (:foreground "#855dcf")))) `(dired-subtree-depth-1-face ((,class (:foreground ,petrol-blue :background "#f2f2f2")))) `(dired-subtree-depth-2-face ((,class (:foreground ,petrol-blue :background "#f2f2f2")))) `(dired-subtree-depth-3-face ((,class (:foreground ,petrol-blue :background "#f2f2f2")))) `(dired-subtree-depth-4-face ((,class (:foreground ,petrol-blue :background "#f2f2f2")))) `(dired-subtree-depth-5-face ((,class (:foreground ,petrol-blue :background "#f2f2f2")))) `(dired-subtree-depth-6-face ((,class (:foreground ,petrol-blue :background "#f2f2f2")))) `(diff-added ((,class (:background "#ddffdd" :foreground "#22863a")))) `(diff-removed ((,class (:background "#ffdddd" :foreground "#d0372d")))) `(diff-changed ((,class (:background "#f8f1d3" :foreground "#bf7000")))) `(diff-refine-added ((,class (:background "#cceecc")))) `(diff-refine-removed ((,class (:background "#eecccc")))) `(diff-refine-changed ((,class (:background "#fce8c9")))) `(diff-header ((,class (:foreground "#8c8c8c" :background "#f2f2f2")))) `(diff-file-header ((,class (:foreground ,petrol-blue :background "#f2f2f2")))) `(diff-hunk-header ((,class (:foreground "#6f42c1" :background "#f2f2f2")))) `(diff-index ((,class (:foreground "#8c8c8c" :background "#f2f2f2")))) `(diff-indicator-added ((,class (:foreground "#22863a" :background "#ddffdd")))) `(diff-indicator-removed ((,class (:foreground "#d0372d" :background "#ffdddd")))) `(diff-indicator-changed ((,class (:foreground "#bf7000" :background "#f8f1d3")))) `(diff-nonexistent ((,class (:foreground "#454545")))) `(ediff-current-diff-A ((,class (:background "#ffdddd")))) `(ediff-current-diff-B ((,class (:background "#ddffdd")))) `(ediff-current-diff-C ((,class (:background "#f8f1d3")))) `(ediff-even-diff-A ((,class (:background "#cccccc")))) `(ediff-even-diff-B ((,class (:background "#cccccc")))) `(ediff-fine-diff-A ((,class (:background "#eecccc")))) `(ediff-fine-diff-B ((,class (:background "#cceecc")))) `(ediff-odd-diff-A ((,class (:background "#cccccc")))) `(ediff-odd-diff-B ((,class (:background "#cccccc")))) `(company-tooltip-common-selection ((,class (:weight normal :foreground "#f2f2f2")))) `(company-tooltip-selection ((,class (:weight normal :foreground "#f2f2f2" :background ,petrol-blue)))) `(company-tooltip-annotation-selection ((,class (:weight normal :foreground "eeeeee")))) `(company-tooltip-common ((,class (:weight bold)))) `(company-tooltip ((,class (:foreground "#454545" :background "#cccccc")))) `(company-tooltip-annotation ((,class (:weight normal :foreground ,petrol-purple)))) `(company-preview-common ((,class (:weight normal :foreground ,petrol-blue :inherit hl-line)))) `(company-scrollbar-bg ((,class (:background "#cccccc")))) `(company-scrollbar-fg ((,class (:background "#8c8c8c")))) `(eldoc-highlight-function-argument ((,class (:foreground "#008abd")))) `(haskell-pragma-face ((,class (:foreground ,petrol-purple)))) `(haskell-keyword-face ((,class (:foreground ,petrol-blue)))) `(haskell-operator-face ((,class (:foreground "#d70087")))) `(haskell-type-face ((,class (:foreground "#008abd")))) `(which-func ((,class (:foreground ,petrol-purple)))) `(undo-tree-visualizer-current-face ((,class (:foreground "#cc6d00")))) `(undo-tree-visualizer-active-branch-face ((,class (:foreground "#b48cff")))) `(undo-tree-visualizer-default-face ((,class (:foreground "#6c4ca8")))) `(undo-tree-visualizer-register-face ((,class (:foreground "#678f03")))) `(undo-tree-visualizer-unmodified-face ((,class (:foreground "#6c7378")))) `(grep-context-face ((,class (:foreground "#919aa1")))) `(grep-error-face ((,class (:foreground "#d0372D")))) `(grep-hit-face ((,class (:foreground ,petrol-blue)))) `(grep-match-face ((,class (:foreground nil :background nil :inherit match)))) `(regex-tool-matched-face ((,class (:foreground nil :background nil :inherit match)))) `(compilation-column-number ((,class (:foreground "#fa8500")))) `(compilation-line-number ((,class (:foreground "#fa8500")))) `(compilation-message-face ((,class (:foreground ,petrol-blue)))) `(compilation-error ((,class (:foreground "#ff9999")))) `(compilation-warning ((,class (:foreground "#f4ad49")))) `(compilation-info ((,class (:foreground "#29bf29")))) `(compilation-mode-line-fail ((,class (:foreground "#ff9999")))) `(compilation-mode-line-exit ((,class (:foreground "#29bf29")))) `(compilation-mode-line-run ((,class (:foreground "#b48cff")))) `(eglot-mode-line ((,class (:foreground "#f2f2f2")))) `(xref-file-header ((,class (:foreground ,petrol-blue :background "#f2f2f2")))) `(flycheck-info ((,class (:underline (:color "#2e994c" :style wave))))) `(flycheck-warning ((,class (:underline (:color "#cc6d00" :style wave))))) `(flycheck-error ((,class (:underline (:color "#d0372d" :style wave))))) `(flycheck-fringe-info ((,class (:foreground "#2e994c")))) `(flycheck-fringe-warning ((,class (:foreground "#cc6d00")))) `(flycheck-fringe-error ((,class (:foreground "#d0372d")))) `(flycheck-warning ((,class (:underline (:color "#cc6d00" :style wave))))) `(flycheck-error ((,class (:underline (:color "#d0372d" :style wave))))) `(flycheck-error-list-line-number ((,class (:foreground ,petrol-purple)))) `(helm-M-x-key ((,class (:foreground "#2e994c")))) `(helm-action ((,class (:foreground "#454545")))) `(helm-header ((,class (:foreground "#f2f2f2" :background "#008abd")))) `(helm-moccur-buffer ((,class (:foreground "#454545" :background "#cfd8dc"))));;highlight moccur buffer name `(helm-source-header ((,class (:foreground "#454545" :background "#cfd8dc" :height 1.3 :bold t)))) `(helm-match ((,class (:foreground "#454545" :background "#fffbc4")))) `(helm-selection ((,class (:background "#cccccc")))) `(helm-selection-line ((,class (:background "#f2f2f2")))) `(helm-separator ((,class (:foreground "#454545")))) `(helm-visible-mark ((,class (:foreground "#d0372d" :background "#ffdddd")))) `(helm-buffer-directory ((,class (:foreground ,petrol-blue :weight normal)))) `(helm-buffer-file ((,class (:foreground "#454545")))) `(helm-buffer-not-saved ((,class (:foreground "#f4ad49")))) `(helm-buffer-process ((,class (:foreground "#d0372d")))) `(helm-buffer-saved-out ((,class (:foreground "#d0372d")))) `(helm-buffer-size ((,class (:foreground "#cc6d00")))) `(helm-candidate-number ((,class (:foreground "#f2f2f2" :background "#cc6d00")))) `(helm-ff-directory ((,class (:foreground ,petrol-blue)))) `(helm-ff-executable ((,class (:foreground "#2e994c")))) `(helm-ff-file ((,class (:foreground "#454545")))) `(helm-ff-invalid-symlink ((,class (:foreground ,petrol-purple :background "#ffdddd")))) `(helm-ff-symlink ((,class (:foreground ,petrol-purple)))) `(which-key-key-face ((,class (:foreground ,petrol-purple)))) `(which-key-special-key-face ((,class (:foreground "#d70087" :height 1.1)))) `(which-key-command-description-face ((,class (:foreground "#454545" )))) `(which-key-group-description-face ((,class (:foreground ,petrol-blue)))) `(which-key-separator-face ((,class (:foreground "#919aa1")))) `(rainbow-delimiters-depth-1-face ((,class (:foreground "#00638a")))) `(rainbow-delimiters-depth-2-face ((,class (:foreground ,petrol-purple)))) `(rainbow-delimiters-depth-3-face ((,class (:foreground "#008080")))) `(rainbow-delimiters-depth-4-face ((,class (:foreground "#2e994c")))) `(rainbow-delimiters-depth-5-face ((,class (:foreground "#00638a")))) `(rainbow-delimiters-depth-6-face ((,class (:foreground ,petrol-purple)))) `(rainbow-delimiters-depth-7-face ((,class (:foreground "#008080")))) `(rainbow-delimiters-depth-8-face ((,class (:foreground "#2e994c")))) `(rainbow-delimiters-depth-9-face ((,class (:foreground "#00638a")))) `(rainbow-delimiters-depth-10-face ((,class (:foreground ,petrol-purple)))) `(rainbow-delimiters-depth-11-face ((,class (:foreground "#008080")))) `(rainbow-delimiters-depth-12-face ((,class (:foreground "#2e994c")))) `(outline-1 ((,class (:height 1.3 :foreground "#008abd")))) `(outline-2 ((,class (:height 1.2 :foreground ,petrol-purple)))) `(outline-3 ((,class (:height 1.1 :foreground "#cc6d00")))) `(outline-4 ((,class (:height 1.0 :foreground "#2e994c")))) `(outline-5 ((,class (:height 1.0 :foreground "#00638a")))) `(outline-6 ((,class (:height 1.0 :foreground "#D0372D")))) `(outline-7 ((,class (:height 1.0 :foreground "#008080")))) `(outline-8 ((,class (:height 1.0 :foreground "#6c7378")))) `(org-level-1 ((,class (:height 1.3 :foreground "#008abd")))) `(org-level-2 ((,class (:height 1.2 :foreground ,petrol-purple)))) `(org-level-3 ((,class (:height 1.1 :foreground "#cc6d00")))) `(org-level-4 ((,class (:height 1.0 :foreground "#2e994c")))) `(org-level-5 ((,class (:height 1.0 :foreground "#00638a")))) `(org-level-6 ((,class (:height 1.0 :foreground "#D0372D")))) `(org-level-7 ((,class (:height 1.0 :foreground "#008080")))) `(org-level-8 ((,class (:height 1.0 :foreground "#6c7378")))) `(org-link ((,class ,petrol-link))) `(org-block ((,class (:background "#f2f2f2")))) `(org-block-background ((,class (:background "#f2f2f2")))) `(org-block-begin-line ((,class (:underline nil :foreground "#454545" :background "#cfd8dc")))) `(org-block-end-line ((,class (:overline nil :foreground "#454545" :background "#cfd8dc")))) `(org-checkbox ((,class (:weight bold :foreground ,petrol-purple :background "#f2f2f2")))) `(org-code ((,class (:foreground "#006400" :background "#fdfff7")))) `(org-table ((,class (:foreground "dark green" :background "#EAFFEA" :inherit fixed-pitch)))) `(org-todo ((,class (:weight bold :box (:line-width 1 :color "#993d3d") :foreground "#993d3d" :background "#ffdddd")))) `(org-done ((,class (:weight bold :box (:line-width 1 :color "#2e994c") :foreground "#2e994c" :background "#ddffdd")))) `(org-headline-done ((,class (:height 1.0 :weight normal :foreground "#454545")))) `(org-date ((,class (:foreground ,petrol-purple)))) `(org-document-title ((,class (:height 1.8 :weight bold :foreground "#454545")))) `(org-verbatim ((,class (:foreground "#0066CC" :background "#F7FDFF")))) `(highlight-numbers-number ((,class (:foreground "#d75f00")))) `(js2-error ((,class (:box (:line-width 1 :color "#d0372d") :background "#ffdddd")))) `(js2-warning ((,class (:underline "#cc6d00")))) `(js2-external-variable ((,class (:foreground "#d0372d")))) `(js2-function-param ((,class (:foreground "#008abd")))) `(js2-instance-member ((,class (:foreground ,petrol-blue)))) `(js2-jsdoc-html-tag-delimiter ((,class (:foreground "#d0372d")))) `(js2-jsdoc-html-tag-name ((,class (:foreground "#d0372d")))) `(js2-jsdoc-tag ((,class (:weight normal :foreground ,petrol-purple)))) `(js2-jsdoc-type ((,class (:foreground "#008abd")))) `(js2-jsdoc-value ((,class (:weight normal :foreground ,petrol-purple)))) `(js2-magic-paren ((,class (:underline t)))) `(js2-private-function-call ((,class (:foreground "#f38e00")))) `(js2-private-member ((,class (:foreground "#008abd")))) `(js2-object-property ((,class (:foreground "#009688")))) `(ivy-current-match ((,class (:background "#cccccc")))) `(ivy-minibuffer-match-face-1 ((,class (:background "#f2f2f2")))) `(ivy-minibuffer-match-face-2 ((,class (:weight bold :background "#fffbc4")))) `(ivy-minibuffer-match-face-3 ((,class (:weight bold :background "#fffbc4")))) `(ivy-minibuffer-match-face-4 ((,class (:weight bold :background "#fffbc4")))) `(swiper-line-face ((,class (:background "#f2f2f2")))) `(swiper-match-face-1 ((,class (:background "#fffbc4")))) `(swiper-match-face-2 ((,class (:background "#fffbc4")))) `(swiper-match-face-3 ((,class (:background "#fffbc4")))) `(swiper-match-face-4 ((,class (:background "#fffbc4")))) `(magit-header-line ((,class (:foreground "#f2f2f2")))) `(magit-hash ((,class (:foreground "#008080")))) `(magit-blame-hash ((,class (:foreground "#008080")))) `(magit-blame-name ((,class (:foreground "#008abd")))) `(magit-blame-date ((,class (:foreground "#cc6d00")))) `(magit-blame-summary ((,class (:foreground "#678f03" :slant italic)))) `(magit-blame-heading ((,class (:background "#e6e6e6")))) `(magit-log-graph ((,class (:foreground ,petrol-purple)))) `(magit-log-author ((,class (:foreground "#008abd")))) `(magit-log-date ((,class (:foreground "#cc6d00")))) `(cypher-clause-face ((,class (:weight normal :foreground "#00638a")))) `(cypher-function-face ((,class (:foreground "#454545")))) `(cypher-keyword-face ((,class (:weight bold :foreground "#00638a")))) `(cypher-node-type-face ((,class (:weight normal :foreground "#008abd")))) `(cypher-pattern-face ((,class (:foreground "#d70087" :background "#f2f2f2")))) `(cypher-relation-type-face ((,class (:weight normal :foreground "#008080")))) `(cypher-symbol-face ((,class (:slant italic :foreground "#454545")))) `(cypher-variable-face ((,class (:foreground "#454545")))) ;; lifted from leuven for now `(w3m-anchor ((,class ,petrol-link))) `(w3m-arrived-anchor ((,class (:foreground "purple1")))) `(w3m-bitmap-image-face ((,class (:foreground "gray4" :background "green")))) `(w3m-bold ((,class (:weight bold :foreground "black")))) `(w3m-current-anchor ((,class (:weight bold :foreground "blue")))) `(w3m-form ((,class (:underline t :foreground "tan1")))) `(w3m-form-button-face ((,class (:weight bold :underline t :foreground "gray4" :background "light grey")))) `(w3m-form-button-mouse-face ((,class (:underline t :foreground "light grey" :background "#2B7E2A")))) `(w3m-form-button-pressed-face ((,class (:weight bold :underline t :foreground "gray4" :background "light grey")))) `(w3m-header-line-location-content-face ((,class (:foreground "#7F7F7F":background "#F7F7F7")))) `(w3m-header-line-location-title-face ((,class (:foreground "#2C55B1" :background "#F7F7F7")))) `(w3m-history-current-url-face ((,class (:foreground "lemon chiffon")))) `(w3m-image-face ((,class (:weight bold :foreground "DarkSeaGreen2")))) `(w3m-link-numbering ((,class (:foreground "#B4C7EB")))) ; mouseless browsing `(w3m-strike-through-face ((,class (:strike-through t)))) `(w3m-underline-face ((,class (:underline t)))) ) ) ;;;###autoload (and load-file-name (boundp 'custom-theme-load-path) (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) (provide-theme 'petrol) (provide 'petrol-theme) ;;; petrol-theme.el ends here ;; Local Variables: ;; eval: (rainbow-mode) ;; End: