camm1-theme.el 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. ;;; camm1-theme.el --- Theme
  2. ;; Copyright (C) 2026 , Lvy
  3. ;; Author: Lvy
  4. ;; Version: 0.1
  5. ;; Package-Requires: ((emacs "24.1"))
  6. ;; Created with ThemeCreator, https://github.com/mswift42/themecreator.
  7. ;; This program is free software: you can redistribute it and/or modify
  8. ;; it under the terms of the GNU General Public License as published by
  9. ;; the Free Software Foundation, either version 3 of the License, or
  10. ;; (at your option) any later version.
  11. ;; This program is distributed in the hope that it will be useful,
  12. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;; GNU General Public License for more details.
  15. ;; You should have received a copy of the GNU General Public License
  16. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. ;; This file is not part of Emacs.
  18. ;;; Commentary:
  19. ;;; camm1 theme created by Lvy in 2026
  20. ;;; Code:
  21. (deftheme camm1)
  22. (let ((class '((class color) (min-colors 89)))
  23. (fg1 "#111")
  24. (fg2 "#242424")
  25. (fg3 "#373737")
  26. (fg4 "#4a4a4a")
  27. (fg6 "#0d0d0d")
  28. (bg1 "#f9fbfb")
  29. (bg2 "#e5e7e7")
  30. (bg3 "#d1d3d3")
  31. (bg4 "#bdbfbf")
  32. (builtin "#eb4747")
  33. (keyword "#55b0f6")
  34. (const "#ffa200")
  35. (comment "#b2b6b8")
  36. (func "#40b7bf")
  37. (str "#abce1c")
  38. (type "#ae58e4")
  39. (var "#f04ceb")
  40. (selection "#005fdb")
  41. (warning "#C82829")
  42. (warning2 "#f48925")
  43. (unspec (when (>= emacs-major-version 29) 'unspecified)))
  44. (custom-theme-set-faces
  45. 'camm1
  46. `(default ((,class (:background ,bg1 :foreground ,fg1))))
  47. ;; syntax
  48. `(font-lock-builtin-face ((,class (:foreground ,builtin))))
  49. `(font-lock-comment-face ((,class (:foreground ,comment))))
  50. `(font-lock-negation-char-face ((,class (:foreground ,const))))
  51. `(font-lock-reference-face ((,class (:foreground ,const))))
  52. `(font-lock-constant-face ((,class (:foreground ,const))))
  53. `(font-lock-doc-face ((,class (:foreground ,comment))))
  54. `(font-lock-function-name-face ((,class (:foreground ,func ))))
  55. `(font-lock-keyword-face ((,class (:bold ,class :foreground ,keyword))))
  56. `(font-lock-string-face ((,class (:foreground ,str))))
  57. `(font-lock-type-face ((,class (:foreground ,type ))))
  58. `(font-lock-variable-name-face ((,class (:foreground ,var))))
  59. `(font-lock-warning-face ((,class (:foreground ,warning :background ,bg2))))
  60. `(term-color-black ((,class (:foreground ,fg2 :background ,unspec))))
  61. ;; `(region ((,class (:background ,fg1 :foreground ,bg1))))
  62. `(region ((,class (:background ,selection))))
  63. `(highlight ((,class (:foreground ,fg3 :background ,bg3))))
  64. `(hl-line ((,class (:background ,bg2))))
  65. `(fringe ((,class (:background ,bg2 :foreground ,fg4))))
  66. `(cursor ((,class (:background ,fg4))))
  67. `(isearch ((,class (:bold t :foreground ,warning :background ,bg3))))
  68. ;;mode
  69. `(mode-line ((,class (:box (:line-width 1 :color nil) :bold t :foreground ,fg4 :background ,bg2))))
  70. `(mode-line-inactive ((,class (:box (:line-width 1 :color nil :style pressed-button) :foreground ,var :background ,bg1 :weight normal))))
  71. `(mode-line-buffer-id ((,class (:bold t :foreground ,func :background ,unspec))))
  72. `(mode-line-highlight ((,class (:foreground ,keyword :box nil :weight bold))))
  73. `(mode-line-emphasis ((,class (:foreground ,fg1))))
  74. `(vertical-border ((,class (:foreground ,fg3))))
  75. `(minibuffer-prompt ((,class (:bold t :foreground ,keyword))))
  76. `(default-italic ((,class (:italic t))))
  77. `(link ((,class (:foreground ,const :underline t))))
  78. `(font-latex-bold-face ((,class (:foreground ,type))))
  79. `(font-latex-italic-face ((,class (:foreground ,var :italic t))))
  80. `(font-latex-string-face ((,class (:foreground ,str))))
  81. `(font-latex-match-reference-keywords ((,class (:foreground ,const))))
  82. `(font-latex-match-variable-keywords ((,class (:foreground ,var))))
  83. `(ido-only-match ((,class (:foreground ,warning))))
  84. `(org-sexp-date ((,class (:foreground ,fg4))))
  85. `(ido-first-match ((,class (:foreground ,keyword :bold t))))
  86. `(ivy-current-match ((,class (:foreground ,fg3 :inherit highlight :underline t))))
  87. `(gnus-header-content ((,class (:foreground ,keyword))))
  88. `(gnus-header-from ((,class (:foreground ,var))))
  89. `(gnus-header-name ((,class (:foreground ,type))))
  90. `(gnus-header-subject ((,class (:foreground ,func :bold t))))
  91. `(mu4e-view-url-number-face ((,class (:foreground ,type))))
  92. `(mu4e-cited-1-face ((,class (:foreground ,fg2))))
  93. `(mu4e-cited-7-face ((,class (:foreground ,fg3))))
  94. `(mu4e-header-marks-face ((,class (:foreground ,type))))
  95. `(ffap ((,class (:foreground ,fg4))))
  96. `(js2-private-function-call ((,class (:foreground ,const))))
  97. `(js2-jsdoc-html-tag-delimiter ((,class (:foreground ,str))))
  98. `(js2-jsdoc-html-tag-name ((,class (:foreground ,var))))
  99. `(js2-external-variable ((,class (:foreground ,type ))))
  100. `(js2-function-param ((,class (:foreground ,const))))
  101. `(js2-jsdoc-value ((,class (:foreground ,str))))
  102. `(js2-private-member ((,class (:foreground ,fg3))))
  103. `(js3-warning-face ((,class (:underline ,keyword))))
  104. `(js3-error-face ((,class (:underline ,warning))))
  105. `(js3-external-variable-face ((,class (:foreground ,var))))
  106. `(js3-function-param-face ((,class (:foreground ,fg2))))
  107. `(js3-jsdoc-tag-face ((,class (:foreground ,keyword))))
  108. `(js3-instance-member-face ((,class (:foreground ,const))))
  109. `(warning ((,class (:foreground ,warning))))
  110. `(ac-completion-face ((,class (:underline t :foreground ,keyword))))
  111. `(info-quoted-name ((,class (:foreground ,builtin))))
  112. `(info-string ((,class (:foreground ,str))))
  113. `(icompletep-determined ((,class :foreground ,builtin)))
  114. `(undo-tree-visualizer-current-face ((,class :foreground ,builtin)))
  115. `(undo-tree-visualizer-default-face ((,class :foreground ,fg2)))
  116. `(undo-tree-visualizer-unmodified-face ((,class :foreground ,var)))
  117. `(undo-tree-visualizer-register-face ((,class :foreground ,type)))
  118. `(slime-repl-inputed-output-face ((,class (:foreground ,type))))
  119. `(trailing-whitespace ((,class :foreground ,unspec :background ,warning)))
  120. `(rainbow-delimiters-depth-1-face ((,class :foreground ,fg1)))
  121. `(rainbow-delimiters-depth-2-face ((,class :foreground ,type)))
  122. `(rainbow-delimiters-depth-3-face ((,class :foreground ,var)))
  123. `(rainbow-delimiters-depth-4-face ((,class :foreground ,const)))
  124. `(rainbow-delimiters-depth-5-face ((,class :foreground ,keyword)))
  125. `(rainbow-delimiters-depth-6-face ((,class :foreground ,fg1)))
  126. `(rainbow-delimiters-depth-7-face ((,class :foreground ,type)))
  127. `(rainbow-delimiters-depth-8-face ((,class :foreground ,var)))
  128. `(magit-item-highlight ((,class :background ,bg3)))
  129. `(magit-section-heading ((,class (:foreground ,keyword :weight bold))))
  130. `(magit-hunk-heading ((,class (:background ,bg3))))
  131. `(magit-section-highlight ((,class (:background ,bg2))))
  132. `(magit-hunk-heading-highlight ((,class (:background ,bg3))))
  133. `(magit-diff-context-highlight ((,class (:background ,bg3 :foreground ,fg3))))
  134. `(magit-diffstat-added ((,class (:foreground ,type))))
  135. `(magit-diffstat-removed ((,class (:foreground ,var))))
  136. `(magit-process-ok ((,class (:foreground ,func :weight bold))))
  137. `(magit-process-ng ((,class (:foreground ,warning :weight bold))))
  138. `(magit-branch ((,class (:foreground ,const :weight bold))))
  139. `(magit-log-author ((,class (:foreground ,fg3))))
  140. `(magit-hash ((,class (:foreground ,fg2))))
  141. `(magit-diff-file-header ((,class (:foreground ,fg2 :background ,bg3))))
  142. `(lazy-highlight ((,class (:foreground ,fg2 :background ,bg3))))
  143. `(term ((,class (:foreground ,fg1 :background ,bg1))))
  144. `(term-color-black ((,class (:foreground ,bg3 :background ,bg3))))
  145. `(term-color-blue ((,class (:foreground ,func :background ,func))))
  146. `(term-color-red ((,class (:foreground ,keyword :background ,bg3))))
  147. `(term-color-green ((,class (:foreground ,type :background ,bg3))))
  148. `(term-color-yellow ((,class (:foreground ,var :background ,var))))
  149. `(term-color-magenta ((,class (:foreground ,builtin :background ,builtin))))
  150. `(term-color-cyan ((,class (:foreground ,str :background ,str))))
  151. `(term-color-white ((,class (:foreground ,fg2 :background ,fg2))))
  152. `(rainbow-delimiters-unmatched-face ((,class :foreground ,warning))))
  153. ;; Legacy
  154. (if (< emacs-major-version 22)
  155. (custom-theme-set-faces
  156. 'camm1
  157. `(show-paren-match-face ((,class (:background ,warning))))) ;; obsoleted in 22.1, removed 2016
  158. (custom-theme-set-faces
  159. 'camm1
  160. `(show-paren-match ((,class (:foreground ,bg1 :background ,str))))
  161. `(show-paren-mismatch ((,class (:foreground ,bg1 :background ,warning))))))
  162. ;; emacs >= 26.1
  163. (when (>= emacs-major-version 26)
  164. (custom-theme-set-faces
  165. 'camm1
  166. `(line-number ((t (:inherit fringe))))
  167. `(line-number-current-line ((t (:inherit fringe :foreground ,fg6 :weight bold))))))
  168. ;; emacs >= 27.1
  169. (when (>= emacs-major-version 27)
  170. (custom-theme-set-faces
  171. 'camm1
  172. `(tab-line ((,class (:background ,bg2 :foreground ,fg4))))
  173. `(tab-line-tab ((,class (:inherit tab-line))))
  174. `(tab-line-tab-inactive ((,class (:background ,bg2 :foreground ,fg4))))
  175. `(tab-line-tab-current ((,class (:background ,bg1 :foreground ,fg1))))
  176. `(tab-line-highlight ((,class (:background ,bg1 :foreground ,fg2))))))
  177. (when (>= emacs-major-version 28)
  178. (custom-theme-set-faces
  179. 'camm1
  180. `(line-number ((t (:inherit fringe))))
  181. `(line-number-current-line ((t (:inherit fringe :foreground ,fg6 :weight bold))))))
  182. ;; emacs >= 27.1
  183. (when (>= emacs-major-version 27)
  184. (custom-theme-set-faces
  185. 'camm1
  186. `(tab-line ((,class (:background ,bg2 :foreground ,fg4))))
  187. `(tab-line-tab ((,class (:inherit tab-line))))
  188. `(tab-line-tab-inactive ((,class (:background ,bg2 :foreground ,fg4))))
  189. `(tab-line-tab-current ((,class (:background ,bg1 :foreground ,fg1))))
  190. `(tab-line-highlight ((,class (:background ,bg1 :foreground ,fg2))))))
  191. (when (>= emacs-major-version 28)
  192. (custom-theme-set-faces
  193. 'camm1
  194. `(tab-line-tab-modified ((,class (:foreground ,warning2 :weight bold))))))
  195. (when (boundp 'font-lock-regexp-face)
  196. (custom-theme-set-faces
  197. 'camm1
  198. `(font-lock-regexp-face ((,class (:inherit font-lock-string-face :underline t)))))))
  199. ;;;###autoload
  200. (when load-file-name
  201. (add-to-list 'custom-theme-load-path
  202. (file-name-as-directory (file-name-directory load-file-name))))
  203. (provide-theme 'camm1)
  204. ;; Local Variables:
  205. ;; no-byte-compile: t
  206. ;; End:
  207. ;;; camm1-theme.el ends here