[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/autothemer 8b865c39a2 08/21: Add readme
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/autothemer 8b865c39a2 08/21: Add readme |
Date: |
Thu, 6 Jan 2022 02:58:09 -0500 (EST) |
branch: elpa/autothemer
commit 8b865c39a280e01dfebbfd7d1da695f2adeb3714
Author: Sebastian Sturm <sturm@itp.uni-leipzig.de>
Commit: Sebastian Sturm <sturm@itp.uni-leipzig.de>
Add readme
---
readme.md | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000000..367599edd4
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,41 @@
+# Readme #
+Autothemer provides a thin layer on top of ```deftheme``` and
```custom-theme-set-faces``` that creates a new custom color theme, based on a
set of simplified face specifications and a user-supplied color palette. As an
example, the following snippet creates a new custom theme that modifies the two
faces ```error``` and ```button```:
+```elisp
+(autothemer-deftheme some-new-theme "This is a rather pointless theme"
+ ;; the first line of the color palette lists display types, ordered from
+ ;; most to least capable
+ ((((class color) (min-colors 32000)) ((class color) (min-colors 90)) t)
+ ;; all following lines list color specifications, starting with the
color's name,
+ ;; then containing the color values corresponding to each display type.
Nil values
+ ;; are automatically replaced by their most recent non-nil precursor
(i.e., the nil
+ ;; below is replaced by "#dd6611")
+ (reddish "#dd6611" nil "#FF0000")
+ ;; missing values at the end are automatically replaced by the last
non-nil entry,
+ ;; in this case "#FFFF00"
+ (yellowish "#dddd22" "#FFFF00")
+ ;; the macro internally creates let* blocks, so these color definitions
may contain
+ ;; both arbitrary functions and references to already defined colors
+ (not-quite-yellowish "#dcdc22" yellowish yellowish))
+
+ ;; Here come the face specifications.
+ ((button (:underline t :weight 'bold :foreground yellowish))
+ (error (:foreground reddish)))
+
+ ;; autothemer-deftheme can also execute an arbitrary function body. Here,
+ ;; all colors refer to their best possible display representations
+ ;; (i.e., reddish = "#dd6611", yellowish = "#dddd22", etc.)
+ (custom-theme-set-variables 'some-new-theme
+ `(ansi-color-names-vector [,reddish
+ ,reddish
+ ,reddish
+ ,yellowish
+ ,yellowish
+ ,yellowish
+ ,not-quite-yellowish
+ ,not-quite-yellowish])))
+```
+
+At theme definition time, ```autothemer-deftheme``` furthermore extracts the
best possible color representations (i.e., the first values in every row of the
color palette, in this case ```"#dd6611"```, ```"#dddd22"``` and
```"#dcdc22"```) and writes the list to a global variable, together with the
corresponding color names.
+
+Missing face customizations can now be generated automatically by calling
```autothemer-generate-templates```. This command iterates over all currently
defined faces that have not been customized during the last invocation of
```autothemer-deftheme```, obtain their current definition and replace every
color value therein by the name of the color palette entry that best
approximates it (where "best" is defined as having the lowest euclidean
distance in RGB space). For instance, if the fac [...]
+
- [nongnu] elpa/autothemer cd4724173d 03/21: Bugfix: ignore colors that are not color-defined-p, (continued)
- [nongnu] elpa/autothemer cd4724173d 03/21: Bugfix: ignore colors that are not color-defined-p, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer b0bf38b202 05/21: Cleanup, add package header, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer f7be1b486f 04/21: Cleanup, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 84a331860f 09/21: Fix for cl-lib, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 869c0e98d7 10/21: Merge pull request #3 from syohex/cl-lib, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer add7d430e0 13/21: call deftheme before evaluating BODY, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 13d1eafc04 14/21: Bump package version to 0.2.2, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer d2f0fa1d92 16/21: Rework and flesh-out the README documentation (#9), ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 69488c71df 18/21: Do not require autothemer or dash at runtime. (#13), ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 36f1f4f0c7 21/21: Bump version to 0.2.3, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 8b865c39a2 08/21: Add readme,
ELPA Syncer <=
- [nongnu] elpa/autothemer 0fdabd22e0 11/21: Fix bug in autothemer-generate-templates, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 8ec0c27a73 19/21: Add color palette export/re-use example, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer b318488f1e 02/21: Allow different face specs for different terminals, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 523a0994e5 07/21: Rename defautotheme to deftheme, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 8c467f5757 15/21: Merge pull request #8 from jasonm23/patch-1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 9e27fbeae5 17/21: Find unused palette entries in generated themes, and fix the FIXME (#12), ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 2e96759b13 20/21: Add license header with GPLv3, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer f1ca2b43a7 06/21: Add brief description, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 4f3ce16225 12/21: Create LICENSE, ELPA Syncer, 2022/01/06