Terminal colour scheme
Parking this here for design feedback, before I share it with the relevant developers...
A short while ago, the Terminal updated its default text colours, to follow the HIG palette. At the same time, in Fedora we've recently had some issues around text legibility in the terminal.
So, I took a look at the new colours, and ran them through Contrast. You can see the results below: there are a number of cases where the contrast is quite low. And I've come up with an updated set of colours which performs better under Contrast.
Currently there is only one default terminal palette, for both dark and light backgrounds. I've introduced separate palettes for each, in order to maximize contrast.
Some caveats: I'm not great with colours, and I'm not super-familiar with how the colours get used in the terminal. I wouldn't be surprised if there's some breakage in places. (But then, it's also hard to eliminate all breakage, because there are so many moving parts in this...)
Analysis
Dark background
Terminal master Proposed
Colour HEX GNOME Palette Contrast A11Y score HEX GNOME Palette Contrast A11Y score
Foreground #FCFCFC 15.1:1 AAA
Background #242424
0 Black #241f31 Dark 4 1.0:1 FAIL #5E5C64 Dark 2 2.5:1 FAIL
1 Red #C01C28 Red 4 2.5:1 FAIL #ED333B Red 2 4.1:1 A
2 Green #33D17A Green 5 7.8:1 AAA #2EC27E Green 4 7.3:1 AAA
3 Yellow #B5835A Brown 2 4.7:1 AA #F6D32D Yellow 3 11.3:1 AAA
4 Blue #1E5098 ? 2.0:1 FAIL #3584E4 Blue 3 4.4:1 A
5 Magenta #A347BA ? 3.2:1 FAIL #C061CB Purple 2 4.6:1 A
6 Cyan #30B7CB ? 7.0:1 AAA #30BFCB ? 7.0:1 AAA
7 Light grey #DEDDDA Light 3 11.4:1 AAA #DEDDDA Light 3 12.3:1 AAA
8 Dark grey #5E5C64 Dark 2 2.4:1 FAIL #77767B Light 5 5.9:1 AA
9 Light red #ED333B Red 2 3.8:1 A #F66151 Red 1 5.4:1 AA
10 Light green #33D17A Green 3 7.8:1 AAA #33D17A Green 2 10.1:1 AAA
11 Light yellow #F8E45C Yellow 2 12.0:1 AAA #F8E45C Yellow 2 12.9:1 AAA
12 Light blue #1C71D8 Blue 4 3.3:1 FAIL #62A0EA Blue 2 6.1:1 AA
13 Light magenta #C061CB Purple 2 4.3:1 A #DC8ADD Purple 1 6.9:1 AAA
14 Light cyan #38DAF3 ? 9.2:1 AAA #38DAF3 ? 9.9:1 AAA
Side note: I compared the Terminal master colours with some of the common colours used by the default VS Code theme, and found that VS Code had better contrast overall.
Light background
Terminal master Proposed
Colour HEX GNOME Palette Contrast A11Y score HEX GNOME Palette Contrast A11Y score
Foreground #FFFFFF
Background #000000
0 Black #241F31 Dark 4 16.0:1 AAA #241F31 Dark 4 16.0:1 AAA
1 Red #C01C28 Red 4 6.1:1 AA #C01C28 Red 4 6.1:1 AA
2 Green #33D17A Green 5 2.0:1 FAIL #218d5b Custom 4.2:1 A
3 Yellow #B5835A Brown 2 3.3:1 FAIL #D09609 Custom 2.2:1 FAIL
4 Blue #1E5098 ? 7.9:1 AAA #1A5fb4 Blue 5 6.3:1 AA
5 Magenta #A347BA ? 4.8:1 AA #9141AC Purple 3 5.9:1 AA
6 Cyan #30B7CB ? 2.4:1 FAIL #29878B Custom 4.3:1 A
7 Light grey #DEDDDA Light 3 1.4:1 FAIL #9A9996 Light 5 2.8:1 FAIL
8 Dark grey #5E5C64 Dark 2 6.6:1 AA #77767B Dark 1 4.5:1 AA
9 Light red #ED333B Red 2 4.1:1 A #E01B24 Red 3 4.8:1 AA
10 Light green #33D17A Green 3 2.0:1 FAIL #26A269 Green 5 3.3:1 FAIL
11 Light yellow #F8E45C Yellow 2 1.3:1 FAIL #E5A50A Yellow 5 2.2:1 FAIL
12 Light blue #1C71D8 Blue 4 4.8:1 AA #1C71D8 Blue 4 4.8:1 AA
13 Light magenta #C061CB Purple 2 3.6:1 A #C061CB Purple 2 3.6:1 A
14 Light cyan #38DAF3 ? 1.7:1 FAIL #0A95AE Custom 3.5:1 A
How it looks
Test it yourself
- It's recommended to make a copy of your existing settings profile, if you've changed the default.
- For some reason this method of changing the colours doesn't seem to be respected by
ls
, which makes the light theme somewhat unusable. It isn't clear what's going on here.
Dark style
To test the dark style:
- Set the default background colour to
#1E1E1E
- Set the default text colour to pure white (
#FFFFFF
) - Run this to set the colour palette:
dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/palette "['rgb(36,31,49)', 'rgb(237,51,59)', 'rgb(46,194,126)', 'rgb(246,211,45)', 'rgb(53,132,228)', 'rgb(192,97,203)', 'rgb(48,191,203)', 'rgb(222,221,218)', 'rgb(119,118,123)', 'rgb(246,97,81)', 'rgb(51,209,122)', 'rgb(248,228,92)', 'rgb(98,160,234)', 'rgb(220,138,221)', 'rgb(56,218,243)', 'rgb(255,255,255)']"
Light style
To test the light style:
- Set the default background colour to pure white (
#FFFFFF
) - Set the default text colour to pure black (
#000000
) - This specifies the intended colours, but for some reason results in a different set:
dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/palette "['rgb(36,31,49)', 'rgb(192,28,40)', 'rgb(33,141,91)', 'rgb(208,150,9)', 'rgb(26,95,180)', 'rgb(145,65,172)', 'rgb(41,135,139)', 'rgb(154,153,150)', 'rgb(119,118,123)', 'rgb(224,27,36)', 'rgb(38,162,105)', 'rgb(245,194,17)', 'rgb(28,113,216)', 'rgb(192,97,203)', 'rgb(10,149,174)', 'rgb(255,255,255)']"