| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- ;;; camm2-theme.el --- A custom light theme based on provided colors -*- lexical-binding: t; -*-
- (deftheme camm2
- "Custom light theme created from user-supplied colors.")
- ;; Helper to reference colors by name (makes the theme cleaner)
- (defun my-color (name)
- (cl-case name
- (fg1 "#111")
- (fg2 "#242424")
- (fg3 "#373737")
- (fg4 "#4a4a4a")
- (fg6 "#0d0d0d")
- (bg1 "#f9fbfb")
- (bg2 "#e5e7e7")
- (bg3 "#d1d3d3")
- (bg4 "#bdbfbf")
- (builtin "#40b7bf")
- (keyword "#55b0f6")
- (const "#ffa200")
- (comment "#b2b6b8")
- (func "#eb4747")
- (str "#a8dc19")
- (type "#ae58e4")
- (var "#f04ceb")
- (selection "#005fdb")
- (warning "#C82829")
- (warning2 "#f48925")))
- (custom-theme-set-faces
- 'camm2
- ;; Basic faces
- `(default ((t (:background ,(my-color 'bg1) :foreground ,(my-color 'fg1)))))
- `(cursor ((t (:background ,(my-color 'fg4)))))
- `(fringe ((t (:background ,(my-color 'bg2) :foreground ,(my-color 'fg3)))))
- `(vertical-border ((t (:foreground ,(my-color 'bg3)))))
- `(linum ((t (:background ,(my-color 'bg1) :foreground ,(my-color 'fg3))))) ; legacy
- `(line-number ((t (:background ,(my-color 'bg1) :foreground ,(my-color 'fg3)))))
- `(line-number-current-line ((t (:background ,(my-color 'bg1) :foreground ,(my-color 'fg1) :weight bold))))
- ;; Font lock faces (syntax highlighting)
- `(font-lock-builtin-face ((t (:foreground ,(my-color 'builtin)))))
- `(font-lock-keyword-face ((t (:foreground ,(my-color 'keyword)))))
- `(font-lock-constant-face ((t (:foreground ,(my-color 'const)))))
- `(font-lock-comment-face ((t (:foreground ,(my-color 'comment) :slant italic))))
- `(font-lock-comment-delimiter-face ((t (:foreground ,(my-color 'comment) :slant italic))))
- `(font-lock-function-name-face ((t (:foreground ,(my-color 'func)))))
- `(font-lock-string-face ((t (:foreground ,(my-color 'str)))))
- `(font-lock-type-face ((t (:foreground ,(my-color 'type)))))
- `(font-lock-variable-name-face ((t (:foreground ,(my-color 'var)))))
- `(font-lock-doc-face ((t (:foreground ,(my-color 'comment) :slant italic))))
- `(font-lock-preprocessor-face ((t (:foreground ,(my-color 'builtin)))))
- `(font-lock-warning-face ((t (:foreground ,(my-color 'warning) :weight bold))))
- ;; Region and selection
- `(region ((t (:background ,(my-color 'selection) :foreground ,(my-color 'bg1)))))
- `(secondary-selection ((t (:background ,(my-color 'bg3)))))
- ;; Mode line
- `(mode-line ((t (:background ,(my-color 'bg2) :foreground ,(my-color 'fg1) :box (:line-width 1 :color ,(my-color 'bg4))))))
- `(mode-line-inactive ((t (:background ,(my-color 'bg1) :foreground ,(my-color 'fg3) :box (:line-width 1 :color ,(my-color 'bg3))))))
- ;; Minibuffer and prompts
- `(minibuffer-prompt ((t (:foreground ,(my-color 'keyword) :weight bold))))
- ;; Highlighting
- `(highlight ((t (:background ,(my-color 'bg3)))))
- `(hl-line ((t (:background ,(my-color 'bg2)))))
- `(isearch ((t (:background ,(my-color 'warning2) :foreground ,(my-color 'bg1)))))
- `(lazy-highlight ((t (:background ,(my-color 'bg4)))))
- ;; Matching parentheses
- `(show-paren-match ((t (:background ,(my-color 'bg3) :foreground ,(my-color 'fg1) :weight bold))))
- `(show-paren-mismatch ((t (:background ,(my-color 'warning) :foreground ,(my-color 'bg1)))))
- ;; Error / warning / success
- `(error ((t (:foreground ,(my-color 'warning) :weight bold))))
- `(warning ((t (:foreground ,(my-color 'warning2) :weight bold))))
- `(success ((t (:foreground ,(my-color 'str)))))
- ;; Button and link
- `(link ((t (:foreground ,(my-color 'keyword) :underline t))))
- `(link-visited ((t (:foreground ,(my-color 'type) :underline t))))
- ;; Tooltip
- `(tooltip ((t (:background ,(my-color 'bg2) :foreground ,(my-color 'fg1) :box (:line-width 1 :color ,(my-color 'bg4))))))
- ;; Dired
- `(dired-directory ((t (:foreground ,(my-color 'keyword) :weight bold))))
- `(dired-symlink ((t (:foreground ,(my-color 'func)))))
- `(dired-ignored ((t (:foreground ,(my-color 'comment)))))
- ;; Custom faces used by Doom modules (modeline, dashboard, etc.)
- `(doom-modeline-bar ((t (:background ,(my-color 'keyword)))))
- `(doom-modeline-buffer-file ((t (:foreground ,(my-color 'func)))))
- `(doom-modeline-buffer-modified ((t (:foreground ,(my-color 'warning2)))))
- `(doom-modeline-project-dir ((t (:foreground ,(my-color 'type)))))
- ;; Company / autocomplete
- `(company-tooltip ((t (:background ,(my-color 'bg2) :foreground ,(my-color 'fg1)))))
- `(company-tooltip-selection ((t (:background ,(my-color 'selection) :foreground ,(my-color 'bg1)))))
- `(company-tooltip-common ((t (:foreground ,(my-color 'func)))))
- `(company-scrollbar-fg ((t (:background ,(my-color 'fg4)))))
- `(company-scrollbar-bg ((t (:background ,(my-color 'bg3)))))
- ;; Outline / Org headings (simple, can be extended)
- `(outline-1 ((t (:foreground ,(my-color 'type) :weight bold))))
- `(outline-2 ((t (:foreground ,(my-color 'func) :weight bold))))
- `(outline-3 ((t (:foreground ,(my-color 'keyword) :weight bold))))
- `(org-level-1 ((t (:inherit outline-1 :height 1.1))))
- `(org-level-2 ((t (:inherit outline-2 :height 1.05))))
- `(org-level-3 ((t (:inherit outline-3))))
- )
- ;; Provide the theme
- (provide-theme 'camm2)
- ;;; camm2-theme.el ends here
|