all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Add new theme
       [not found] <20220318214352.uvusoy7cnqr5y6oj.ref@Ergus>
@ 2022-03-18 21:43 ` Ergus
  2022-03-20 20:34   ` Philip Kaludercic
  0 siblings, 1 reply; 2+ messages in thread
From: Ergus @ 2022-03-18 21:43 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 132 bytes --]

Hi:

I have a very simple color theme (attached) I would like to add to
vanilla... Is there any process to get it in?

Best,
Ergus


[-- Attachment #2: simple-16-theme.el --]
[-- Type: text/plain, Size: 7549 bytes --]

;;; simple-16-theme.el --- Custom theme for faces  -*- lexical-binding:t -*-

;; Copyright (C) 2020 Free Software Foundation, Inc.

;; Author: Jimmy Aguilar Mena <spacibba@aol.com>

;; This file is part of GNU Emacs.

;; GNU Emacs 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.

;; GNU Emacs 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 GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.

;;; Code:

(deftheme simple-16
  "Dark theme with a set of simple 16 colors only.")

(defmacro simple-16-theme-color (colorname)
  "Get color by name COLORNAME from `simple-16-color-theme-alist'."
  (alist-get colorname '((black . "#000000")
                         (red . "#cd0000")
                         (green . "#00cd00")
                         (yellow . "#cdcd00")
                         (blue . "#0000ee")
                         (magenta . "#cd00cd")
                         (cyan . "#00cdcd")
                         (white . "#e5e5e5")
                         (brightblack . "#444444") ;;
                         (brightred . "#ff0000")
                         (brightgreen . "#00ff00")
                         (brightyellow . "#ffff00")
                         (brightblue . "#5c5cff")
                         (brightmagenta . "#ff00ff")
                         (brightcyan . "#00ffff")
                         (brightwhite . "#ffffff"))))

(custom-theme-set-faces
 'simple-16
 `(default ((t :background ,(simple-16-theme-color black)
               :foreground ,(simple-16-theme-color white))))

 `(font-lock-builtin-face ((t :foreground ,(simple-16-theme-color green))))
 `(font-lock-comment-face ((t :foreground ,(simple-16-theme-color blue))))
 `(font-lock-constant-face ((t :foreground ,(simple-16-theme-color magenta))))
 `(font-lock-doc-face ((t :foreground ,(simple-16-theme-color cyan))))
 `(font-lock-function-name-face ((t :foreground ,(simple-16-theme-color white))))
 `(font-lock-keyword-face ((t :foreground ,(simple-16-theme-color yellow))))
 `(font-lock-preprocessor-face ((t :foreground ,(simple-16-theme-color magenta))))
 `(font-lock-string-face ((t :foreground ,(simple-16-theme-color red))))
 `(font-lock-type-face ((t :foreground ,(simple-16-theme-color green))))
 `(font-lock-variable-name-face ((t :foreground ,(simple-16-theme-color white))))

 `(highlight ((default :background ,(simple-16-theme-color blue) :foreground nil)
	      (((class color) (min-colors 16)) :background ,(simple-16-theme-color brightblack))))

 `(secondary-selection ((t :background ,(simple-16-theme-color blue) :foreground nil)
			(((class color) (min-colors 16)) :background ,(simple-16-theme-color brightblack))))

 `(isearch ((t :background ,(simple-16-theme-color blue)
	       :foreground nil
	       :weight ultrabold)))

 `(lazy-highlight ((default :background ,(simple-16-theme-color cyan))
		   (((class color) (min-colors 16)) :background ,(simple-16-theme-color brightblack))))

 `(region ((default :background ,(simple-16-theme-color blue)
		    :foreground ,(simple-16-theme-color white))
	   (((class color) (min-colors 16)) :background ,(simple-16-theme-color brightblue) :foreground nil)))

 `(trailing-whitespace ((default :background ,(simple-16-theme-color cyan))
			(((class color) (min-colors 16)) :background ,(simple-16-theme-color brightblack))))

 ;; Modeline
 `(mode-line ((t :background ,(simple-16-theme-color blue)
		 :foreground ,(simple-16-theme-color white)
		 :weight bold)))

 `(mode-line-inactive ((default :background ,(simple-16-theme-color black)
				:foreground ,(simple-16-theme-color white)
				:weight normal)
		       (((class color) (min-colors 16))
			:background ,(simple-16-theme-color brightblack)
			:foreground ,(simple-16-theme-color brightwhite))))

 ;; line numbers
 `(line-number ((default :foreground ,(simple-16-theme-color white))
		(((class color) (min-colors 16)) :foreground ,(simple-16-theme-color brightblack))))

 `(line-number-current-line ((t :foreground ,(simple-16-theme-color green))))

 ;; column indicator
 `(fill-column-indicator ((default :foreground ,(simple-16-theme-color white))
			  (((class color) (min-colors 16)) :foreground ,(simple-16-theme-color brightblack))))

 `(show-paren-match ((default :background ,(simple-16-theme-color blue))
		     (((class color) (min-colors 16)) :background ,(simple-16-theme-color brightblack))))

 ;; tab-bar
 `(tab-bar ((t :inherit default :weight light)))
 `(tab-bar-tab ((t :inherit tab-bar :background ,(simple-16-theme-color blue) :weight ultra-bold)))
 `(tab-bar-tab-inactive ((t :inherit tab-bar :foreground ,(simple-16-theme-color white))))

 ;; tab-line
 `(tab-line ((t :inherit default :weight light)))
 `(tab-line-tab ((t :inherit tab-line)))
 `(tab-line-tab-current ((t :inherit tab-line :background ,(simple-16-theme-color blue) :weight ultra-bold)))
 `(tab-line-tab-inactive ((t :inherit tab-line :foreground ,(simple-16-theme-color white))))

 ;; Some others
 `(Man-overstrike ((t :inherit font-lock-type-face :bold t)))
 `(Man-underline ((t :inherit font-lock-keyword-face :underline t)))

 `(which-func ((t :background nil :foreground ,(simple-16-theme-color white))))

 `(dired-directory ((t :foreground ,(simple-16-theme-color cyan))))

 ;; External packages
 ;; Company
 `(company-tooltip ((default :background ,(simple-16-theme-color blue)
			     :foreground ,(simple-16-theme-color white))
		    (((class color) (min-colors 16)) :background ,(simple-16-theme-color brightblack))))

 `(company-tooltip-common ((t :inherit company-tooltip
                              :foreground ,(simple-16-theme-color green))))
 `(company-tooltip-selection ((t :background ,(simple-16-theme-color blue)
                                 :weight ultra-bold)))
 `(company-tooltip-scrollbar-track ((default :background ,(simple-16-theme-color blue))
				    (((class color) (min-colors 16)) :background ,(simple-16-theme-color brightblack))))

 `(company-tooltip-scrollbar-thumb ((t :background ,(simple-16-theme-color blue))))

 ;; Avy
 `(avy-lead-face ((t :background ,(simple-16-theme-color blue)
		     :foreground ,(simple-16-theme-color brightwhite))))

 ;; Flycheck
 `(flycheck-error ((t :inherit nil :background nil :foreground nil :underline t)))

 ;; Flymake
 `(flymake-error ((t :inherit nil :background nil :foreground nil :underline t)))

 ;; highlight-escape-sequences
 `(hes-escape-backslash-face ((t :inherit font-lock-regexp-grouping-backslash
				 :foreground ,(simple-16-theme-color magenta))))
 `(hes-escape-sequence-face ((t :inherit font-lock-regexp-grouping-construct
				:foreground ,(simple-16-theme-color magenta))))
 ;; mu4e
 `(mu4e-unread-face ((t :inherit nil :foreground ,(simple-16-theme-color blue) :weight bold)))
 `(mu4e-system-face ((t :inherit nil :foreground ,(simple-16-theme-color green))))
 `(mu4e-trashed-face ((t :inherit nil :foreground ,(simple-16-theme-color red))))
 ;;`(mu4e-replied-face ((t (:inherit nil :foreground ,(simple-16-theme-color blue)))))
 `(mu4e-header-highlight-face ((t :inherit hl-line :weight bold :underline nil)))
 )

(provide-theme 'simple-16)

;;; simple-16-theme.el ends here

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Add new theme
  2022-03-18 21:43 ` Add new theme Ergus
@ 2022-03-20 20:34   ` Philip Kaludercic
  0 siblings, 0 replies; 2+ messages in thread
From: Philip Kaludercic @ 2022-03-20 20:34 UTC (permalink / raw)
  To: Ergus; +Cc: emacs-devel

Ergus <spacibba@aol.com> writes:

> Hi:
>
> I have a very simple color theme (attached) I would like to add to
> vanilla... Is there any process to get it in?

I'd format it as a patch to emacs.git?

> Best,
> Ergus
>
> ;;; simple-16-theme.el --- Custom theme for faces  -*- lexical-binding:t -*-
>
> ;; Copyright (C) 2020 Free Software Foundation, Inc.

                   ^
                   Should this be updated?
-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-20 20:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220318214352.uvusoy7cnqr5y6oj.ref@Ergus>
2022-03-18 21:43 ` Add new theme Ergus
2022-03-20 20:34   ` Philip Kaludercic

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.