Skip to content

Commit debb037

Browse files
committed
Doc: rewrite Solarized comparison
1 parent aa2c185 commit debb037

File tree

1 file changed

+67
-58
lines changed

1 file changed

+67
-58
lines changed

whats-wrong-with-solarized.md

Lines changed: 67 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,103 @@
1-
How Selenized improves upon Solarized
2-
=====================================
1+
How Selenized improves on Solarized
2+
===================================
33

4-
Selenized is based on [Solarized color
5-
palette](http://ethanschoonover.com/solarized), which was designed by Ethan
6-
Schoonover. Solarized has some great features, but it does have a few issues
7-
as well (this is why I have created Selenized) - they are discussed below.
4+
I really liked the design principles behind Solarized - it has some great
5+
features. However, it has a few problems as well, which Selenized solves:
86

7+
* [Confusing accent colors](#better-accent-colors)
8+
* [Not enough contrast](#slightly-higher-contrast)
9+
* [Dark version is too dark](#better-lightness)
10+
* [Hacky implementation in terminals](#better-terminal-compatibility)
911

1012

11-
Problems with accent colors
12-
---------------------------
1313

14-
<!-- TODO: add colorwheel image -->
14+
Better accent colors
15+
--------------------
1516

16-
Some accent colors in Solarized are a bit too similar to each other.
17-
For example, magenta can be easy to confuse with red on some displays and in
18-
some situations. Yes, they *are* different, but they should be less ambiguous.
19-
Similarly, green is too close to yellow.
17+
Some accent colors in Solarized are confusing or too similar to each other:
18+
19+
* green is too much like yellow (looks like olive)
20+
* orange looks almost like red
21+
* magenta too close to red as well
22+
* violet is easy to confuse with blue
23+
24+
![Solarized and Selenized colorwheel comparison](https://i.imgur.com/1AsC3pS.png)
25+
26+
This is less of a problem on high-end, color-calibrated displays, but on a
27+
regular screen (like the one on my ThinkPad from a couple years ago) it can be
28+
really difficult to tell some colors apart. Selenized makes the differences
29+
clearer.
2030

2131
<!-- TODO: add picture with git log -->
2232

23-
In fact, green in Solarized is not like typical green - it is more like olive.
24-
Personally I prefer more "traditional" green.
2533

26-
Selenized uses different, less ambiguous hues than Solarized (although the
27-
difference may seem small, especially on cheap displays).
2834

35+
Slightly higher contrast
36+
------------------------
37+
38+
Ethan says on Solarized website that he had tested it in a variety of lighting
39+
conditions. However, in practice I have encountered numerous situations when
40+
Solarized readability was not satisfactory. This is confirmed by [Web Content
41+
Accessibility Guidelines](https://www.w3.org/WAI/standards-guidelines/wcag/),
42+
which requires contrast of [4.5 for AA
43+
grade](https://www.w3.org/TR/WCAG21/#contrast-minimum) and [7.0 for AAA
44+
grade](https://www.w3.org/TR/WCAG21/#contrast-enhanced):
45+
46+
| color/color combination | Solarized | Selenized dark | Selenized black |
47+
| ---------------------------- | --------- | -------------- | --------------- |
48+
| main content (foreground) | 4.75 - AA :heavy_check_mark: | 6.07 - AA :heavy_check_mark: | 9.05 - AAA :heavy_check_mark::heavy_check_mark: |
49+
| fg on bg highlight | 4.11 - :thinking:\* | 5.04 - AA :heavy_check_mark: | 7.81 - AAA :heavy_check_mark::heavy_check_mark: |
50+
| secondary content (comments) | 2.79 - AA :x: | 3.23 - :thinking:\* | 3.97 - :thinking:\* |
51+
| red (darkest accent color) | 3.25 - :thinking:\* | 3.71 - :thinking:\* | 4.79 - AA :heavy_check_mark: |
2952

53+
:thinking:\* _WCAG says that contrast of 3.0 is acceptable if the font has
54+
sufficient size and weight. 3.0 is also the minimum contrast for body text
55+
required by ISO-9241-3._
3056

31-
Problems with contrast
32-
----------------------
57+
<!-- sele vs sola screenshot -->
3358

34-
Ethan says on Solarized website that he had tested Solarized on a variety of
35-
monitors in different lighting conditions. However, I have encountered
36-
situations when readability of Solarized was not satisfactory - especially on
37-
mediocre displays (maybe Ethan only used high-quality screens for testing?).
38-
Selenized has slightly increased contrast (50 "Lab units" instead of 45) and
39-
looks good on all displays, expensive and cheap.
59+
Contrast in Selenized remains moderately low, but it is significantly more
60+
readable in poor lighting than Solarized.
4061

41-
Another, more serious problem is that Solarized dark works well when used all
42-
by itself, but it is too dark to be placed next to a high-contrast window that
43-
has black text on white background (e.g. a pdf or a browser). Here is a
44-
screenshot of Solarized dark next to Wikipedia:
62+
63+
64+
Better lightness
65+
----------------
66+
67+
Solarized dark may work well when used all by itself, but it's *too dark* when
68+
placed next to a window with high-contrast content:
4569

4670
![Solarized next to black&white Wikipedia](http://i.imgur.com/UlOxerG.png)
4771

48-
This problem is more visible when someone uses Solarized dark for snippets of
49-
code on a high-contrast website, like this:
72+
This is even more visible when Solarized dark is used for a code snippets on
73+
a website with white background:
5074

5175
![short code sample with Solarized](http://i.imgur.com/vStjfca.png)
5276

53-
Selenized solves this problem by increasing contrast and making the whole dark
54-
variant lighter:
77+
Selenized dark is slightly lighter and doesn't have this problem:
5578

5679
![Selenized next to black&white Wikipedia](http://i.imgur.com/OX2Ce2r.png)
5780

5881
![short code sample with Selenized](http://i.imgur.com/fm8Orae.png)
5982

6083

6184

62-
Problems with implementation
63-
----------------------------
85+
Better terminal compatibility
86+
-----------------------------
6487

65-
One of the features of Solarized is that both light and dark variants can be
66-
constructed from the same set of 16 colors. This is a nice property, but
67-
implementing it in case of terminal emulators requires using a weird mapping of
68-
color codes to actual color values.
88+
Solarized puts both light and dark variants in one color palette, resulting in
89+
a weird mapping of ANSI color codes to actual color values. For example,
90+
Solarized maps color code meant for bright/bold green to "base 01" (greyish
91+
shade used for comments):
6992

7093
![color code assignment - solarized](http://i.imgur.com/Rn3yhw1.png)
7194

72-
For example, you can see that color code traditionally used for bright/bold
73-
green is used by Solarized for "secondary content" (i.e. color used for
74-
comments), and so on. The result is that many command line programs will
75-
produce weird-looking or unreadable output unless they are configured with
76-
specific Solarized settings. See [this
77-
issue](https://github.com/altercation/solarized/issues/220) and [this Stack
78-
Overflow
79-
question](http://stackoverflow.com/questions/14093554/vim-solarized-on-os-x-terminal-app-incorrect-colors)
80-
for an example.
95+
Because of that many command line programs will produce strange or unreadable
96+
output (see examples
97+
[here](https://github.com/altercation/solarized/issues/220) and
98+
[here](http://stackoverflow.com/questions/14093554/vim-solarized-on-os-x-terminal-app-incorrect-colors)).
8199

82-
Selenized adheres to standard meanings of terminal color codes:
100+
Selenized keeps standard meaning of terminal color codes:
83101

84102
![color code assignment - selenized](http://i.imgur.com/h6Rog02.png)
85103

86-
Some programs may need adjustments to work well with Selenized, but such issues
87-
happen less frequently.
88-
89-
Apart from terminals, I think that the decision to use exactly the same accent
90-
colors in both light and dark variants of Solarized was wrong. This constraint
91-
forces the lightness of the accent colors to be a compromise, rather than
92-
picking optimal lightness for dark and light versions separately - and the
93-
benefits of this solution are, in my opinion, negligible.
94-

0 commit comments

Comments
 (0)