Introduction
Harmonia is a group of colour palettes I have created to make life a bit more comfortable. They were designed primarily for two use cases: ANSI terminals and generic text documents. In both cases, there are two variants: “day” and “night”.
This blog is using “Harmonia for documents” and acts as a kind of testbed. You can switch between day and night modes by clicking on the symbols of the Sun and the Moon in the top-right corner.
Why another palette?
I was not happy with the existing ones, of course.
For a start, many of them were too extreme for eyes, using the starkest possible black and white. I suppose part of the reason for that was that that combination of black and white provides the highest contrast, which is good. The downside is that you feel like looking at a light bulb (when it is black on white) or an abyss with fiery symbols in it (when it is white on black). That did not feel comfortable.
Then I did not like that some palettes like Solarized had either yellowish or blueish backgrounds. That felt wrong and uncomfortable. When I read a book, the book’s paper is essentially white and that’s what I like. Also, coloured background leads to a distorted perception of coloured text.
I also felt that I’d like all colours of the same group of brightness should have the same intensity. That was missing completely from the existing palettes, as far as I can tell. I also understand why: human perception of colours is very much asymmetric.
So I went for a creation of my own palettes.
There are two groups of Harmonia palettes: Harmonia for ANSI terminals and Harmonia for documents.
Harmonia for documents
Design
Here I am going to explain the guiding principles I used when creating Harmonia for documents.
- There should be two modes: day and night. The day mode is for casual use in an office environment. The night mode is for the situation where everything around is really dark (for instance, when you are driving in a car).
- Human perception in the appropriate environment should be taken into account as much as practical. CIECAM02 is to be used as a model.
- Colours must be gentle to the eyes.
- The contrast between the default background and default text should be high.
- Colours form groups, and within each group their intensity and lightness must be identical.
- Colours form opposite pairs on the hue wheel.
- The default background must not be coloured.
- For very special situations there has to be a provision for a colour which deliberately breaks out of the rules. It has to be vivid red, and it is to be used exclusively when there is a need to show an error and draw attention to it.
The resulting solution looks like this:
Normal ink has the starkest colour (black in day mode, white in night mode). This is mainly to improve the contrast of normal text.
Normal paper is not the starkest possible (very light grey in day mode, very dark grey in night mode). This still allows for a very good contract but also has additional benefits:
- In the day mode, off-white does not burn yes as much as hard white.
- In the night mode, it creates a gentle background which prepares eyes for the brighter text.
- In both modes, it allows for a starker version which is used for highlighting.
There is a mid-plane of intensity, where intensity is between that of normal ink and normal paper. The mid-plane has eight colours and a grey.
There is also a plane for coloured ink, which is close in intensity to the normal ink and features eight colours and a grey.
Similarly, there is a plane for coloured paper, which is close in intensity to the normal paper and features eight colours and a grey.
In addition to that, there is faint ink and stark paper for less than important text and for highlighting the background.
Planes of Harmonia
How to use it?
I suggest using the rules when using the palettes:
- Use the night version when you are in a very dark environment. For everything else day version is the best choice.
- Most of the text should be normal ink and the background must be normal paper. The colour of the background defines the overall brightness and the colour of the screen, so if you switch it to something else, the palette would not work as designed.
- Use special error ink for error messages (and nothing else). It must be used sparingly.
- If you need to use coloured text, prefer coloured ink as its brightness is closest to the normal text while still allowing for colours to be visible. There is also a grey in the same plane, which may be used to gently distinguish something from the rest of the text.
- For things which should not actively attract attention you can use faint ink.
- When choosing colours, consider using opposite pairs like red vs cyan, or yellow vs blue. Avoid using closely related colours like pink with magenta and cyan with blue-green, unless you really know what you are doing.
- In some situations, you may want to use equidistant triplets of colours like red-blue-green or magenta-yellow-cyan.
- Avoid using middle-plane colours as ink, because the contrast with the background would be poorer. However, text in those colours may still look good if it has an appropriate outline (consider normal ink or grey ink for that) and/or a shadow. A larger font may also help readability.
- For coloured backgrounds prefer the plane of coloured paper.
- Consider using colours from the middle plane as a background only for small items, so that they would not disturb the overall brightness of the page.
- Consider using highlighted paper as a background colour for some items which need to stand out and would not benefit from a hue.
Where is it?
You can find Cascading Style Sheets of Harmonia for Documents here.
Harmonia for ANSI Terminals
Design
The design consideration in Harmonia for ANSI terminals is similar to those in Harmonia for documents, but a number of additional constraints are present and have to be dealt with.
The colours in ANSI terminals follow a specific standard and there are significant challenges in making a harmonious palette for them while retaining good contrast.
In fact, I would argue that no matter how you design a palette for ANSI terminals, there will be situations where the palette does not perform well. The situation is particularly bad when people use coloured text on a coloured background.
ANSI standard was invented in the days when a black-on-white palette would be unusual. “Bright” in black-on-white palettes also means “more visible on the background”, while “Bright” in dark-on-light palettes would be less visible on the background.
Result
A pre-alpha version of Harmonia for ANSI terminals can be found here.