camm3-theme.el 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. ;;; camm3-theme.el --- Custom theme based on user palette -*- lexical-binding: t; -*-
  2. (deftheme camm3 "Custom theme with neutrals, syntax highlighting, and UI feedback.")
  3. (let ((class '((class color) (min-colors 89)))
  4. ;; Neutrals & surfaces
  5. (bg-base "#f9fbfb")
  6. (bg-panel "#f2f4f4")
  7. (bg-surface-2 "#e5e7e7")
  8. (bg-surface-3 "#d1d3d3")
  9. (border "#bdbfbf")
  10. (border-focus "#005fdb")
  11. ;; Text scale
  12. (text-primary "#0d0d0d")
  13. (text-secondary "#111111")
  14. (text-tertiary "#242424")
  15. (text-muted "#373737")
  16. (text-faint "#4a4a4a")
  17. (text-faint-2 "#5d5d5d")
  18. (text-inverse "#ffffff")
  19. ;; Syntax highlighting
  20. (code-comment "#b2b6b8")
  21. (code-builtin "#40b7bf")
  22. (code-keyword "#55b0f6")
  23. (code-constant "#ffa200")
  24. (code-function "#c42020")
  25. (code-string "#a8dc19")
  26. (code-type "#8a35b8")
  27. (code-variable "#f04ceb")
  28. (code-number "#f48925")
  29. (code-operator "#4a4a4a")
  30. ;; UI & feedback
  31. (ui-selection "#005fdb")
  32. (ui-selection-bg "#e6eeff")
  33. (ui-cursor "#005fdb")
  34. (ui-active-line "#f0f4ff")
  35. (status-error "#c82829")
  36. (status-warning "#f48925")
  37. (status-success "#22a653")
  38. (status-info "#3b82f6"))
  39. (custom-theme-set-faces
  40. 'camm3
  41. ;; Basic faces
  42. `(default ((,class (:background ,bg-base :foreground ,text-primary))))
  43. `(cursor ((,class (:background ,ui-cursor))))
  44. `(region ((,class (:background ,ui-selection-bg :foreground ,ui-selection))))
  45. `(fringe ((,class (:background ,bg-panel :foreground ,text-faint))))
  46. `(highlight ((,class (:background ,ui-active-line))))
  47. `(hl-line ((,class (:background ,ui-active-line))))
  48. `(vertical-border ((,class (:foreground ,border))))
  49. `(window-divider ((,class (:foreground ,border))))
  50. `(window-divider-first-pixel ((,class (:foreground ,border))))
  51. `(window-divider-last-pixel ((,class (:foreground ,border))))
  52. `(minibuffer-prompt ((,class (:foreground ,status-info :weight bold))))
  53. `(link ((,class (:foreground ,status-info :underline t))))
  54. `(link-visited ((,class (:foreground ,code-type :underline t))))
  55. `(shadow ((,class (:foreground ,text-faint))))
  56. `(success ((,class (:foreground ,status-success :weight bold))))
  57. `(warning ((,class (:foreground ,status-warning :weight bold))))
  58. `(error ((,class (:foreground ,status-error :weight bold))))
  59. ;; Mode line
  60. `(mode-line ((,class (:background ,bg-surface-2 :foreground ,text-primary
  61. :box (:line-width 1 :color ,border)))))
  62. `(mode-line-inactive ((,class (:background ,bg-panel :foreground ,text-faint
  63. :box (:line-width 1 :color ,border)))))
  64. `(mode-line-buffer-id ((,class (:weight bold :foreground ,ui-selection))))
  65. ;; Line numbers
  66. `(line-number ((,class (:background ,bg-base :foreground ,text-faint-2))))
  67. `(line-number-current-line ((,class (:background ,ui-active-line :foreground ,text-primary :weight bold))))
  68. ;; Font lock (syntax highlighting)
  69. `(font-lock-builtin-face ((,class (:foreground ,code-builtin))))
  70. `(font-lock-comment-face ((,class (:foreground ,code-comment :slant italic))))
  71. `(font-lock-comment-delimiter-face ((,class (:foreground ,code-comment :slant italic))))
  72. `(font-lock-constant-face ((,class (:foreground ,code-constant))))
  73. `(font-lock-doc-face ((,class (:foreground ,code-comment :slant italic))))
  74. `(font-lock-function-name-face ((,class (:foreground ,code-function))))
  75. `(font-lock-keyword-face ((,class (:foreground ,code-keyword))))
  76. `(font-lock-number-face ((,class (:foreground ,code-number))))
  77. `(font-lock-operator-face ((,class (:foreground ,code-operator))))
  78. `(font-lock-string-face ((,class (:foreground ,code-string))))
  79. `(font-lock-type-face ((,class (:foreground ,code-type))))
  80. `(font-lock-variable-name-face ((,class (:foreground ,code-variable))))
  81. `(font-lock-warning-face ((,class (:foreground ,status-warning :weight bold))))
  82. ;; Search & match
  83. `(isearch ((,class (:background ,ui-selection :foreground ,text-inverse))))
  84. `(isearch-fail ((,class (:background ,status-error :foreground ,text-inverse))))
  85. `(lazy-highlight ((,class (:background ,ui-selection-bg :foreground ,ui-selection :underline t))))
  86. `(match ((,class (:background ,ui-selection-bg :foreground ,ui-selection))))
  87. ;; Secondary selection (e.g., multiple-cursors)
  88. `(secondary-selection ((,class (:background ,bg-surface-3))))
  89. ;; Trailing whitespace
  90. `(trailing-whitespace ((,class (:background ,status-error :foreground ,text-inverse))))
  91. ;; Diff (vc-gutter, magit)
  92. `(diff-added ((,class (:foreground ,status-success))))
  93. `(diff-removed ((,class (:foreground ,status-error))))
  94. `(diff-refine-added ((,class (:background ,status-success :foreground ,text-inverse))))
  95. `(diff-refine-removed ((,class (:background ,status-error :foreground ,text-inverse))))
  96. `(diff-header ((,class (:background ,bg-panel :foreground ,text-tertiary))))
  97. `(diff-file-header ((,class (:background ,bg-surface-2 :foreground ,text-primary :weight bold))))
  98. ;; Org mode
  99. `(org-level-1 ((,class (:foreground ,ui-selection :weight bold :height 1.2))))
  100. `(org-level-2 ((,class (:foreground ,code-function :weight bold :height 1.1))))
  101. `(org-level-3 ((,class (:foreground ,code-type :weight bold))))
  102. `(org-level-4 ((,class (:foreground ,code-variable :weight bold))))
  103. `(org-level-5 ((,class (:foreground ,code-builtin :weight bold))))
  104. `(org-level-6 ((,class (:foreground ,code-constant :weight bold))))
  105. `(org-level-7 ((,class (:foreground ,code-keyword :weight bold))))
  106. `(org-level-8 ((,class (:foreground ,code-string :weight bold))))
  107. `(org-todo ((,class (:foreground ,status-error :weight bold))))
  108. `(org-done ((,class (:foreground ,status-success :weight bold))))
  109. `(org-date ((,class (:foreground ,code-number :underline t))))
  110. `(org-link ((,class (:foreground ,status-info :underline t))))
  111. `(org-block ((,class (:background ,bg-surface-2 :extend t))))
  112. `(org-block-begin-line ((,class (:background ,bg-panel :foreground ,text-faint))))
  113. `(org-block-end-line ((,class (:background ,bg-panel :foreground ,text-faint))))
  114. ;; Doom modeline specific (if using doom-modeline)
  115. `(doom-modeline-bar ((,class (:background ,ui-selection))))
  116. `(doom-modeline-buffer-modified ((,class (:foreground ,status-warning))))
  117. `(doom-modeline-buffer-major-mode ((,class (:foreground ,code-type :weight bold))))
  118. `(doom-modeline-project-root-dir ((,class (:foreground ,code-builtin))))
  119. `(doom-modeline-evil-normal-state ((,class (:background ,ui-selection :foreground ,text-inverse))))
  120. `(doom-modeline-evil-insert-state ((,class (:background ,status-success :foreground ,text-inverse))))
  121. `(doom-modeline-evil-visual-state ((,class (:background ,code-variable :foreground ,text-inverse))))
  122. ;; Tree-sitter (if you use tree-sitter modes)
  123. `(tree-sitter-hl-face:function.call ((,class (:foreground ,code-function))))
  124. `(tree-sitter-hl-face:function.builtin ((,class (:foreground ,code-builtin))))
  125. `(tree-sitter-hl-face:function ((,class (:foreground ,code-function))))
  126. `(tree-sitter-hl-face:type ((,class (:foreground ,code-type))))
  127. `(tree-sitter-hl-face:constant ((,class (:foreground ,code-constant))))
  128. `(tree-sitter-hl-face:keyword ((,class (:foreground ,code-keyword))))
  129. `(tree-sitter-hl-face:string ((,class (:foreground ,code-string))))
  130. `(tree-sitter-hl-face:comment ((,class (:foreground ,code-comment :slant italic))))
  131. `(tree-sitter-hl-face:variable ((,class (:foreground ,code-variable))))
  132. `(tree-sitter-hl-face:number ((,class (:foreground ,code-number))))
  133. `(tree-sitter-hl-face:operator ((,class (:foreground ,code-operator))))
  134. `(tree-sitter-hl-face:property ((,class (:foreground ,text-secondary))))
  135. ;; Company / Corfu completion
  136. `(company-tooltip ((,class (:background ,bg-panel :foreground ,text-primary))))
  137. `(company-tooltip-selection ((,class (:background ,ui-selection-bg :foreground ,ui-selection))))
  138. `(company-tooltip-common ((,class (:foreground ,code-keyword))))
  139. `(company-tooltip-annotation ((,class (:foreground ,text-faint))))
  140. `(company-scrollbar-bg ((,class (:background ,bg-surface-3))))
  141. `(company-scrollbar-fg ((,class (:background ,border))))
  142. `(corfu-current ((,class (:background ,ui-selection-bg :foreground ,ui-selection))))
  143. ;; LSP / Flycheck
  144. `(flycheck-error ((,class (:underline (:style wave :color ,status-error)))))
  145. `(flycheck-warning ((,class (:underline (:style wave :color ,status-warning)))))
  146. `(flycheck-info ((,class (:underline (:style wave :color ,status-info)))))
  147. `(lsp-face-highlight-textual ((,class (:background ,ui-active-line :underline t))))
  148. `(lsp-face-highlight-read ((,class (:background ,ui-selection-bg :underline t))))
  149. `(lsp-face-highlight-write ((,class (:background ,ui-selection-bg :underline t))))
  150. ;; Whitespace mode
  151. `(whitespace-space ((,class (:foreground ,bg-surface-3))))
  152. `(whitespace-tab ((,class (:foreground ,bg-surface-3))))
  153. `(whitespace-newline ((,class (:foreground ,bg-surface-3))))
  154. `(whitespace-indentation ((,class (:foreground ,bg-surface-3))))
  155. `(whitespace-line ((,class (:background ,ui-active-line :foreground ,text-primary))))
  156. `(whitespace-empty ((,class (:background ,status-error :foreground ,text-inverse))))
  157. ;; Highlight indentation guides (indent-guides)
  158. `(highlight-indent-guides-character-face ((,class (:foreground ,border))))
  159. `(highlight-indent-guides-stack-character-face ((,class (:foreground ,bg-surface-3))))
  160. `(highlight-indent-guides-odd-face ((,class (:background ,bg-panel))))
  161. `(highlight-indent-guides-even-face ((,class (:background ,bg-base))))
  162. ;; IMenu / Outline
  163. `(imenu-list-entry-face-0 ((,class (:foreground ,code-keyword))))
  164. `(imenu-list-entry-face-1 ((,class (:foreground ,code-function))))
  165. `(imenu-list-entry-face-2 ((,class (:foreground ,code-type))))
  166. `(imenu-list-entry-face-3 ((,class (:foreground ,code-constant))))
  167. ;; Avy (jump hints)
  168. `(avy-lead-face ((,class (:background ,ui-selection :foreground ,text-inverse :weight bold))))
  169. `(avy-lead-face-0 ((,class (:background ,status-success :foreground ,text-inverse :weight bold))))
  170. `(avy-lead-face-1 ((,class (:background ,status-warning :foreground ,text-inverse :weight bold))))
  171. `(avy-lead-face-2 ((,class (:background ,code-variable :foreground ,text-inverse :weight bold))))
  172. `(avy-background-face ((,class (:background ,bg-panel :foreground ,text-faint))))
  173. ;; Denote (notes)
  174. `(denote-faces-link ((,class (:foreground ,status-info :underline t))))
  175. `(denote-faces-date ((,class (:foreground ,code-number))))
  176. `(denote-faces-keyword ((,class (:foreground ,code-keyword :weight bold))))
  177. `(denote-faces-title ((,class (:foreground ,text-primary :weight bold :height 1.2))))
  178. ;; Extra: markdown, json, etc.
  179. `(markdown-header-face-1 ((,class (:inherit org-level-1))))
  180. `(markdown-header-face-2 ((,class (:inherit org-level-2))))
  181. `(markdown-header-face-3 ((,class (:inherit org-level-3))))
  182. `(markdown-header-face-4 ((,class (:inherit org-level-4))))
  183. `(markdown-header-face-5 ((,class (:inherit org-level-5))))
  184. `(markdown-header-face-6 ((,class (:inherit org-level-6))))
  185. `(markdown-link-face ((,class (:inherit link))))
  186. `(markdown-url-face ((,class (:foreground ,code-number))))
  187. `(json-key-face ((,class (:foreground ,code-keyword))))
  188. `(json-number-face ((,class (:foreground ,code-number))))
  189. `(json-string-face ((,class (:foreground ,code-string))))
  190. `(json-boolean-face ((,class (:foreground ,code-constant))))
  191. `(json-null-face ((,class (:foreground ,code-constant))))
  192. ;; Custom faces used in user config (e.g., my-set-buffer-font buffer-face)
  193. `(buffer-face ((,class (:family "Noto Sans" :height 140))))))
  194. ;; Provide the theme
  195. (provide-theme 'camm3)
  196. ;;; camm3-theme.el ends here