1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00

Convert ANSI color definitions in themes to use faces (e.g. 'ansi-color-red')

* etc/themes/dichromacy-theme.el:
* etc/themes/leuven-theme.el:
* etc/themes/misterioso-theme.el:
* etc/themes/tango-theme.el:
* etc/themes/tango-dark-theme.el:
* etc/themes/wombat-theme.el: Convert ANSI color definitions to
use faces.
This commit is contained in:
Jim Porter 2021-10-19 16:01:15 -07:00 committed by Lars Ingebrigtsen
parent 8e7cd29712
commit 1bb14f93f1
6 changed files with 148 additions and 38 deletions

View File

@ -113,12 +113,34 @@ Ansi-Color faces are included.")
`(flyspell-duplicate ((,class (:weight unspecified :foreground unspecified
:slant unspecified :underline ,orange))))
`(flyspell-incorrect ((,class (:weight unspecified :foreground unspecified
:slant unspecified :underline ,redpurple)))))
(custom-theme-set-variables
'dichromacy
`(ansi-color-names-vector ["black" ,vermillion ,bluegreen ,yellow
,blue ,redpurple ,skyblue "white"])))
:slant unspecified :underline ,redpurple))))
;; ANSI color
`(ansi-color-black ((,class (:background "black" :foreground "black"))))
`(ansi-color-red ((,class (:background ,vermillion
:foreground ,vermillion))))
`(ansi-color-green ((,class (:background ,bluegreen
:foreground ,bluegreen))))
`(ansi-color-yellow ((,class (:background ,yellow :foreground ,yellow))))
`(ansi-color-blue ((,class (:background ,blue :foreground ,blue))))
`(ansi-color-magenta ((,class (:background ,redpurple
:foreground ,redpurple))))
`(ansi-color-cyan ((,class (:background ,skyblue :foreground ,skyblue))))
`(ansi-color-white ((,class (:background "gray90" :foreground "gray90"))))
`(ansi-color-bright-black ((,class (:background "black"
:foreground "black"))))
`(ansi-color-bright-red ((,class (:background ,vermillion
:foreground ,vermillion))))
`(ansi-color-bright-green ((,class (:background ,bluegreen
:foreground ,bluegreen))))
`(ansi-color-bright-yellow ((,class (:background ,yellow
:foreground ,yellow))))
`(ansi-color-bright-blue ((,class (:background ,blue :foreground ,blue))))
`(ansi-color-bright-magenta ((,class (:background ,redpurple
:foreground ,redpurple))))
`(ansi-color-bright-cyan ((,class (:background ,skyblue
:foreground ,skyblue))))
`(ansi-color-bright-white ((,class (:background "gray90"
:foreground "gray90"))))))
(provide-theme 'dichromacy)

View File

@ -287,6 +287,25 @@ more...")
`(message-header-xheader ((,class ,mail-header-other)))
`(message-mml ((,class (:foreground "forest green"))))
;; ANSI colors.
`(ansi-color-bold ((,class (:weight bold))))
`(ansi-color-black ((,class (:foreground "black" :background "black"))))
`(ansi-color-red ((,class (:foreground "red3" :background "red3"))))
`(ansi-color-green ((,class (:foreground "forest green" :background "forest green"))))
`(ansi-color-yellow ((,class (:foreground "yellow3" :background "yellow3"))))
`(ansi-color-blue ((,class (:foreground "blue" :background "blue"))))
`(ansi-color-magenta ((,class (:foreground "magenta3" :background "magenta3"))))
`(ansi-color-cyan ((,class (:foreground "deep sky blue" :background "deep sky blue"))))
`(ansi-color-white ((,class (:foreground "gray60" :background "gray60"))))
`(ansi-color-bright-black ((,class (:foreground "gray30" :background "gray30"))))
`(ansi-color-bright-red ((,class (:foreground "red1" :background "red1"))))
`(ansi-color-bright-green ((,class (:foreground "lime green" :background "lime green"))))
`(ansi-color-bright-yellow ((,class (:foreground "yellow2" :background "yellow2"))))
`(ansi-color-bright-blue ((,class (:foreground "dodger blue" :background "dodger blue"))))
`(ansi-color-bright-magenta ((,class (:foreground "magenta" :background "magenta"))))
`(ansi-color-bright-cyan ((,class (:foreground "sky blue" :background "sky blue"))))
`(ansi-color-bright-white ((,class (:foreground "gray80" :background "gray80"))))
;; Diff.
`(diff-added ((,class ,diff-added)))
`(diff-changed ((,class ,diff-changed)))
@ -1035,12 +1054,6 @@ more...")
;; highlight-sexp-mode.
'(hl-sexp-background-color "#efebe9")
'(ansi-color-faces-vector
[default default default italic underline success warning error])
;; Colors used in Shell mode.
'(ansi-color-names-vector
["black" "red3" "ForestGreen" "yellow3" "blue" "magenta3" "DeepSkyBlue" "gray50"])
)
;;;###autoload

View File

@ -101,12 +101,33 @@
`(message-header-subject ((,class (:foreground "#dbdb95"))))
`(message-header-to ((,class (:foreground "#00ede1"))))
`(message-cited-text ((,class (:foreground "#74af68"))))
`(message-separator ((,class (:foreground "#23d7d7"))))))
(custom-theme-set-variables
'misterioso
'(ansi-color-names-vector ["#2d3743" "#ff4242" "#74af68" "#dbdb95"
"#34cae2" "#008b8b" "#00ede1" "#e1e1e0"]))
`(message-separator ((,class (:foreground "#23d7d7"))))
;; ANSI colors
`(ansi-color-black ((,class (:background "#2d3743" :foreground "#2d3743"))))
`(ansi-color-red ((,class (:background "#da3938" :foreground "#da3938"))))
`(ansi-color-green ((,class (:background "#74af68" :foreground "#74af68"))))
`(ansi-color-yellow ((,class (:background "#dbdb95" :foreground "#dbdb95"))))
`(ansi-color-blue ((,class (:background "#34cae2" :foreground "#34cae2"))))
`(ansi-color-magenta ((,class (:background "#b33c97"
:foreground "#b33c97"))))
`(ansi-color-cyan ((,class (:background "#008b8b" :foreground "#008b8b"))))
`(ansi-color-white ((,class (:background "#e1e1e0" :foreground "#e1e1e0"))))
`(ansi-color-bright-black ((,class (:background "#415160"
:foreground "#415160"))))
`(ansi-color-bright-red ((,class (:background "#ff4242"
:foreground "#ff4242"))))
`(ansi-color-bright-green ((,class (:background "#74cd65"
:foreground "#74cd65"))))
`(ansi-color-bright-yellow ((,class (:background "#ffad29"
:foreground "#ffad29"))))
`(ansi-color-bright-blue ((,class (:background "#59e9ff"
:foreground "#59e9ff"))))
`(ansi-color-bright-magenta ((,class (:background "#ed74cd"
:foreground "#ed74cd"))))
`(ansi-color-bright-cyan ((,class (:background "#00ede1"
:foreground "#00ede1"))))
`(ansi-color-bright-white ((,class (:background "#eeeeec"
:foreground "#eeeeec"))))))
(provide-theme 'misterioso)

View File

@ -45,7 +45,9 @@ Semantic, and Ansi-Color faces are included.")
(alum-4 "#888a85") (alum-5 "#555753") (alum-6 "#2e3436")
;; Not in Tango palette; used for better contrast.
(cham-0 "#b4fa70") (blue-0 "#8cc4ff") (plum-0 "#e9b2e3")
(red-0 "#ff4b4b") (alum-5.5 "#41423f") (alum-7 "#212526"))
(red-0 "#ff4b4b") (alum-5.5 "#41423f") (alum-7 "#212526")
;; Not in Tango palette; used for ANSI cyan.
(cyan-1 "#34e2e2") (cyan-2 "#06989a"))
(custom-theme-set-faces
'tango-dark
@ -162,12 +164,31 @@ Semantic, and Ansi-Color faces are included.")
`(semantic-decoration-on-unparsed-includes
((,class (:background ,alum-5.5))))
`(semantic-tag-boundary-face ((,class (:overline ,blue-1))))
`(semantic-unmatched-syntax-face ((,class (:underline ,red-1)))))
(custom-theme-set-variables
'tango-dark
`(ansi-color-names-vector [,alum-7 ,red-0 ,cham-0 ,butter-1
,blue-1 ,plum-1 ,blue-0 ,alum-1])))
`(semantic-unmatched-syntax-face ((,class (:underline ,red-1))))
;; ANSI colors
`(ansi-color-black ((,class (:background ,alum-7 :foreground ,alum-7))))
`(ansi-color-red ((,class (:background ,red-1 :foreground ,red-1))))
`(ansi-color-green ((,class (:background ,cham-2 :foreground ,cham-2))))
`(ansi-color-yellow ((,class (:background ,butter-2 :foreground ,butter-2))))
`(ansi-color-blue ((,class (:background ,blue-2 :foreground ,blue-2))))
`(ansi-color-magenta ((,class (:background ,plum-1 :foreground ,plum-1))))
`(ansi-color-cyan ((,class (:background ,cyan-2 :foreground ,cyan-2))))
`(ansi-color-white ((,class (:background ,alum-2 :foreground ,alum-2))))
`(ansi-color-bright-black ((,class (:background ,alum-5
:foreground ,alum-5))))
`(ansi-color-bright-red ((,class (:background ,red-0 :foreground ,red-0))))
`(ansi-color-bright-green ((,class (:background ,cham-1
:foreground ,cham-1))))
`(ansi-color-bright-yellow ((,class (:background ,butter-1
:foreground ,butter-1))))
`(ansi-color-bright-blue ((,class (:background ,blue-0
:foreground ,blue-0))))
`(ansi-color-bright-magenta ((,class (:background ,plum-0
:foreground ,plum-0))))
`(ansi-color-bright-cyan ((,class (:background ,cyan-1
:foreground ,cyan-1))))
`(ansi-color-bright-white ((,class (:background ,alum-1
:foreground ,alum-1))))))
(provide-theme 'tango-dark)

View File

@ -44,7 +44,9 @@ Semantic, and Ansi-Color faces are included.")
(alum-1 "#eeeeec") (alum-2 "#d3d7cf") (alum-3 "#babdb6")
(alum-4 "#888a85") (alum-5 "#5f615c") (alum-6 "#2e3436")
;; Not in Tango palette; used for better contrast.
(cham-4 "#346604") (blue-0 "#8cc4ff") (orange-4 "#b35000"))
(cham-4 "#346604") (blue-0 "#8cc4ff") (orange-4 "#b35000")
;; Not in Tango palette; used for ANSI cyan.
(cyan-1 "#34e2e2") (cyan-2 "#06989a"))
(custom-theme-set-faces
'tango
@ -145,12 +147,31 @@ Semantic, and Ansi-Color faces are included.")
`(semantic-decoration-on-unparsed-includes
((,class (:underline ,orange-3))))
`(semantic-tag-boundary-face ((,class (:overline ,blue-1))))
`(semantic-unmatched-syntax-face ((,class (:underline ,red-1)))))
(custom-theme-set-variables
'tango
`(ansi-color-names-vector [,alum-6 ,red-3 ,cham-3 ,butter-3
,blue-3 ,plum-3 ,blue-1 ,alum-1])))
`(semantic-unmatched-syntax-face ((,class (:underline ,red-1))))
;; ANSI colors
`(ansi-color-black ((,class (:background ,alum-6 :foreground ,alum-6))))
`(ansi-color-red ((,class (:background ,red-2 :foreground ,red-2))))
`(ansi-color-green ((,class (:background ,cham-3 :foreground ,cham-3))))
`(ansi-color-yellow ((,class (:background ,butter-3 :foreground ,butter-3))))
`(ansi-color-blue ((,class (:background ,blue-2 :foreground ,blue-2))))
`(ansi-color-magenta ((,class (:background ,plum-2 :foreground ,plum-2))))
`(ansi-color-cyan ((,class (:background ,cyan-2 :foreground ,cyan-2))))
`(ansi-color-white ((,class (:background ,alum-2 :foreground ,alum-2))))
`(ansi-color-bright-black ((,class (:background ,alum-5
:foreground ,alum-5))))
`(ansi-color-bright-red ((,class (:background ,red-1 :foreground ,red-1))))
`(ansi-color-bright-green ((,class (:background ,cham-1
:foreground ,cham-1))))
`(ansi-color-bright-yellow ((,class (:background ,butter-1
:foreground ,butter-1))))
`(ansi-color-bright-blue ((,class (:background ,blue-1
:foreground ,blue-1))))
`(ansi-color-bright-magenta ((,class (:background ,plum-1
:foreground ,plum-1))))
`(ansi-color-bright-cyan ((,class (:background ,cyan-1
:foreground ,cyan-1))))
`(ansi-color-bright-white ((,class (:background ,alum-1
:foreground ,alum-1))))))
(provide-theme 'tango)

View File

@ -95,12 +95,24 @@ are included.")
`(message-header-subject ((,class (:foreground "#cae682"))))
`(message-header-to ((,class (:foreground "#cae682"))))
`(message-cited-text ((,class (:foreground "#99968b"))))
`(message-separator ((,class (:foreground "#e5786d" :weight bold))))))
(custom-theme-set-variables
'wombat
'(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682"
"#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"]))
`(message-separator ((,class (:foreground "#e5786d" :weight bold))))
;; ANSI colors
`(ansi-color-black ((,class (:background "#242424" :foreground "#242424"))))
`(ansi-color-red ((,class (:background "#b85149" :foreground "#b85149"))))
`(ansi-color-green ((,class (:background "#92a65e" :foreground "#92a65e"))))
`(ansi-color-yellow ((,class (:background "#ccaa8f" :foreground "#ccaa8f"))))
`(ansi-color-blue ((,class (:background "#5b98c2" :foreground "#5b98c2"))))
`(ansi-color-magenta ((,class (:background "#64619a" :foreground "#64619a"))))
`(ansi-color-cyan ((,class (:background "#3f9f9e" :foreground "#3f9f9e"))))
`(ansi-color-white ((,class (:background "#f6f3e8" :foreground "#f6f3e8"))))
`(ansi-color-bright-black ((,class (:background "#444444" :foreground "#444444"))))
`(ansi-color-bright-red ((,class (:background "#e5786d" :foreground "#e5786d"))))
`(ansi-color-bright-green ((,class (:background "#95e454" :foreground "#95e454"))))
`(ansi-color-bright-yellow ((,class (:background "#edc4a3" :foreground "#edc4a3"))))
`(ansi-color-bright-blue ((,class (:background "#8ac6f2" :foreground "#8ac6f2"))))
`(ansi-color-bright-magenta ((,class (:background "#a6a1de" :foreground "#a6a1de"))))
`(ansi-color-bright-cyan ((,class (:background "#70cecc" :foreground "#70cecc"))))
`(ansi-color-bright-white ((,class (:background "#ffffff" :foreground "#ffffff"))))))
(provide-theme 'wombat)