summaryrefslogtreecommitdiffstats
path: root/colorschemes
diff options
context:
space:
mode:
authorMarkus Peloquin <markus@cs.wisc.edu>2019-11-15 16:23:32 -0800
committerSean E. Russell <seanerussell@gmail.com>2020-02-13 12:39:08 -0600
commit44b8ac9c1a80d2a019a694591558ac0c2f8be2d5 (patch)
treec3f45d554545db6226be2957f59ec1d873e56bcd /colorschemes
parent0932e3c3d09245a4c8796ac5258a913d79c24c8d (diff)
Solarized theme fixes
The Solarized theme doesn't work well on light themes. (Light/dark have identical palettes, but the foreground/background colors are different and greys obviously get used differently.) This commit makes the 'solarized' theme use the foreground color instead of '250' and use the average of base00 and base0 for DiskBar. (These greys are already close to 50%.) This commit also adds two 16-color themes utilizing the extra violet/ orange colors, and uses the appropriate grey color for DiskBar.
Diffstat (limited to 'colorschemes')
-rw-r--r--colorschemes/solarized.go9
-rw-r--r--colorschemes/solarized16-dark.go27
-rw-r--r--colorschemes/solarized16-light.go27
3 files changed, 60 insertions, 3 deletions
diff --git a/colorschemes/solarized.go b/colorschemes/solarized.go
index 3ce9997..5968310 100644
--- a/colorschemes/solarized.go
+++ b/colorschemes/solarized.go
@@ -1,10 +1,13 @@
package colorschemes
+// This is a neutral version of the Solarized 256-color palette. The exception
+// is that the one grey color uses the average of base0 and base00, which are
+// already middle of the road.
var Solarized = Colorscheme{
- Fg: 250,
+ Fg: -1,
Bg: -1,
- BorderLabel: 250,
+ BorderLabel: -1,
BorderLine: 37,
CPULines: []int{61, 33, 37, 64, 125, 160, 166, 136},
@@ -18,7 +21,7 @@ var Solarized = Colorscheme{
Sparkline: 33,
- DiskBar: 245,
+ DiskBar: 243,
TempLow: 64,
TempHigh: 160,
diff --git a/colorschemes/solarized16-dark.go b/colorschemes/solarized16-dark.go
new file mode 100644
index 0000000..f8cdab7
--- /dev/null
+++ b/colorschemes/solarized16-dark.go
@@ -0,0 +1,27 @@
+package colorschemes
+
+// This scheme assumes the terminal already uses Solarized. Only DiskBar is
+// different between dark/light.
+var Solarized16Dark = Colorscheme{
+ Fg: -1,
+ Bg: -1,
+
+ BorderLabel: -1,
+ BorderLine: 6,
+
+ CPULines: []int{13, 4, 6, 2, 5, 1, 9, 3},
+
+ BattLines: []int{13, 4, 6, 2, 5, 1, 9, 3},
+
+ MainMem: 5,
+ SwapMem: 9,
+
+ ProcCursor: 4,
+
+ Sparkline: 4,
+
+ DiskBar: 12, // base0
+
+ TempLow: 2,
+ TempHigh: 1,
+}
diff --git a/colorschemes/solarized16-light.go b/colorschemes/solarized16-light.go
new file mode 100644
index 0000000..8426a95
--- /dev/null
+++ b/colorschemes/solarized16-light.go
@@ -0,0 +1,27 @@
+package colorschemes
+
+// This scheme assumes the terminal already uses Solarized. Only DiskBar is
+// different between dark/light.
+var Solarized16Light = Colorscheme{
+ Fg: -1,
+ Bg: -1,
+
+ BorderLabel: -1,
+ BorderLine: 6,
+
+ CPULines: []int{13, 4, 6, 2, 5, 1, 9, 3},
+
+ BattLines: []int{13, 4, 6, 2, 5, 1, 9, 3},
+
+ MainMem: 5,
+ SwapMem: 9,
+
+ ProcCursor: 4,
+
+ Sparkline: 4,
+
+ DiskBar: 11, // base00
+
+ TempLow: 2,
+ TempHigh: 1,
+}