Skip to content

Commit

Permalink
Refine fringe-specific accented backgrounds
Browse files Browse the repository at this point in the history
Meant to improve the performance of those colours in various relevant
scenaria.

The tables below show their relative luminance compared with
fg-main (the important one), bg-active, bg-inactive respectively.
Against fg-main the contrast must be >= 7:1 to conform with the WCAG AAA
standard.  The rest are offered as a comparison, with a value >= 1.3:1
considered passable (because the 7:1 applies to text, not whole blocks
which are easier to discern, plus it only concerns text directly on top
of a given background, not adjacent to it, as is the case with the
elements that would here be >= 1.3:1).

The new values are in the first section of the table.

Modus Operandi fringes new vs old
=================================

| Colour name       |        | 000000 | d7d7d7 | efefef |
|-------------------+--------+--------+--------+--------|
| red-fringe-bg     | f08290 |   8.30 |   1.76 |   2.20 |
| green-fringe-bg   | 62c86a |   9.99 |   1.46 |   1.83 |
| yellow-fringe-bg  | dbba3f |  11.11 |   1.31 |   1.64 |
| blue-fringe-bg    | 82afff |   9.53 |   1.53 |   1.92 |
| magenta-fringe-bg | e0a3ff |  10.85 |   1.34 |   1.68 |
| cyan-fringe-bg    | 2fcddf |  10.92 |   1.34 |   1.67 |
|-------------------+--------+--------+--------+--------|
| red-fringe-bg     | ff9a9a |  10.34 |   1.41 |   1.77 |
| green-fringe-bg   | 86cf86 |  11.28 |   1.29 |   1.62 |
| yellow-fringe-bg  | e0c050 |  11.83 |   1.23 |   1.54 |
| blue-fringe-bg    | 82afff |   9.53 |   1.53 |   1.92 |
| magenta-fringe-bg | f0a3ff |  11.39 |   1.28 |   1.60 |
| cyan-fringe-bg    | 00d6e0 |  11.69 |   1.25 |   1.56 |

Modus Vivendi fringes new vs old
================================

| Colour name       |        | ffffff | 323232 | 1e1e1e |
|-------------------+--------+--------+--------+--------|
| red-fringe-bg     | 8f1f4b |   8.52 |   1.51 |   1.96 |
| green-fringe-bg   | 006700 |   7.14 |   1.80 |   2.33 |
| yellow-fringe-bg  | 6f4f00 |   7.52 |   1.71 |   2.22 |
| blue-fringe-bg    | 3f33af |   9.11 |   1.41 |   1.83 |
| magenta-fringe-bg | 6f2f89 |   8.59 |   1.49 |   1.94 |
| cyan-fringe-bg    | 004f8f |   8.35 |   1.54 |   2.00 |
|-------------------+--------+--------+--------+--------|
| red-fringe-bg     | 8f0040 |   9.37 |   1.37 |   1.78 |
| green-fringe-bg   | 006000 |   7.86 |   1.63 |   2.12 |
| yellow-fringe-bg  | 6f4a00 |   7.91 |   1.62 |   2.11 |
| blue-fringe-bg    | 3a30ab |   9.59 |   1.34 |   1.74 |
| magenta-fringe-bg | 692089 |   9.68 |   1.32 |   1.72 |
| cyan-fringe-bg    | 0068a0 |   6.02 |   2.13 |   2.77 |
  • Loading branch information
protesilaos committed Sep 27, 2020
1 parent e06b6d4 commit 7316e33
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions modus-operandi-theme.el
Original file line number Diff line number Diff line change
Expand Up @@ -1171,10 +1171,10 @@ AMOUNT is a customisation option."
("magenta-active" . "#5c2092") ("cyan-active" . "#003f8a")
;; styles that are meant exclusively for the fringes
;;
;; must be combined with `fg-main' or `fg-dim'
("red-fringe-bg" . "#ff9a9a") ("green-fringe-bg" . "#86cf86")
("yellow-fringe-bg" . "#e0c050") ("blue-fringe-bg" . "#82afff")
("magenta-fringe-bg" . "#f0a3ff") ("cyan-fringe-bg" . "#00d6e0")
;; must be combined with `fg-main'
("red-fringe-bg" . "#f08290") ("green-fringe-bg" . "#62c86a")
("yellow-fringe-bg" . "#dbba3f") ("blue-fringe-bg" . "#82afff")
("magenta-fringe-bg" . "#e0a3ff") ("cyan-fringe-bg" . "#2fcddf")
;; styles reserved for specific faces
;;
;; `bg-hl-line' is between `bg-dim' and `bg-alt', so it should
Expand Down Expand Up @@ -1351,12 +1351,12 @@ Also bind `class' to ((class color) (min-colors 89))."
`(modus-theme-nuanced-cyan ((,class :background ,cyan-nuanced-bg
,@(and (>= emacs-major-version 27) '(:extend t)))))
;;;;; fringe-specific combinations
`(modus-theme-fringe-red ((,class :background ,red-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-green ((,class :background ,green-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-yellow ((,class :background ,yellow-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-blue ((,class :background ,blue-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-magenta ((,class :background ,magenta-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-cyan ((,class :background ,cyan-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-red ((,class :background ,red-fringe-bg :foreground ,fg-main)))
`(modus-theme-fringe-green ((,class :background ,green-fringe-bg :foreground ,fg-main)))
`(modus-theme-fringe-yellow ((,class :background ,yellow-fringe-bg :foreground ,fg-main)))
`(modus-theme-fringe-blue ((,class :background ,blue-fringe-bg :foreground ,fg-main)))
`(modus-theme-fringe-magenta ((,class :background ,magenta-fringe-bg :foreground ,fg-main)))
`(modus-theme-fringe-cyan ((,class :background ,cyan-fringe-bg :foreground ,fg-main)))
;;;;; special base values
;; these are closer to the grayscale than the accents defined above
;; and should only be used when the next closest alternative would be
Expand Down
20 changes: 10 additions & 10 deletions modus-vivendi-theme.el
Original file line number Diff line number Diff line change
Expand Up @@ -1171,10 +1171,10 @@ AMOUNT is a customisation option."
("magenta-active" . "#d5b1ff") ("cyan-active" . "#00d8b4")
;; styles that are meant exclusively for the fringes
;;
;; must be combined with `fg-main' or `fg-dim'
("red-fringe-bg" . "#8f0040") ("green-fringe-bg" . "#006000")
("yellow-fringe-bg" . "#6f4a00") ("blue-fringe-bg" . "#3a30ab")
("magenta-fringe-bg" . "#692089") ("cyan-fringe-bg" . "#0068a0")
;; must be combined with `fg-main'
("red-fringe-bg" . "#8f1f4b") ("green-fringe-bg" . "#006700")
("yellow-fringe-bg" . "#6f4f00") ("blue-fringe-bg" . "#3f33af")
("magenta-fringe-bg" . "#6f2f89") ("cyan-fringe-bg" . "#004f8f")
;; styles reserved for specific faces
;;
;; `bg-hl-line' is between `bg-dim' and `bg-alt', so it should
Expand Down Expand Up @@ -1351,12 +1351,12 @@ Also bind `class' to ((class color) (min-colors 89))."
`(modus-theme-nuanced-cyan ((,class :background ,cyan-nuanced-bg
,@(and (>= emacs-major-version 27) '(:extend t)))))
;;;;; fringe-specific combinations
`(modus-theme-fringe-red ((,class :background ,red-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-green ((,class :background ,green-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-yellow ((,class :background ,yellow-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-blue ((,class :background ,blue-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-magenta ((,class :background ,magenta-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-cyan ((,class :background ,cyan-fringe-bg :foreground ,fg-dim)))
`(modus-theme-fringe-red ((,class :background ,red-fringe-bg :foreground ,fg-main)))
`(modus-theme-fringe-green ((,class :background ,green-fringe-bg :foreground ,fg-main)))
`(modus-theme-fringe-yellow ((,class :background ,yellow-fringe-bg :foreground ,fg-main)))
`(modus-theme-fringe-blue ((,class :background ,blue-fringe-bg :foreground ,fg-main)))
`(modus-theme-fringe-magenta ((,class :background ,magenta-fringe-bg :foreground ,fg-main)))
`(modus-theme-fringe-cyan ((,class :background ,cyan-fringe-bg :foreground ,fg-main)))
;;;;; special base values
;; these are closer to the grayscale than the accents defined above
;; and should only be used when the next closest alternative would be
Expand Down

0 comments on commit 7316e33

Please sign in to comment.