forked from sunaku/sunaku.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruvbox-terminal-color-scheme.html
101 lines (97 loc) · 10.7 KB
/
gruvbox-terminal-color-scheme.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html><html><head><meta charset="utf-8" /><meta content="noarchive" name="robots" /><title>Gruvbox terminal color scheme - The Terminal Programmer</title><meta content="2016-03-03T16:37:00-08:00" name="DCTERMS.created" /><meta content="2018-12-20T19:17:07-08:00" name="DCTERMS.modified" /><meta content="Suraj N. Kurapati" name="author" /><meta content="terminal, color, vim, linux" name="keywords" /><meta content="width=device-width, initial-scale=1" name="viewport" /><meta content="Readably https://github.com/sunaku/readably" name="generator" /><link href="style.css" rel="stylesheet" type="text/css" /><link href="index.atom" rel="alternate" title="feed" type="application/atom+xml" /><script src="js/jquery.slim.min.js"></script></head><body><article data-entry-id="gruvbox-terminal-color-scheme" id="body"><header><div class="navigation"><a class="rootlink" href="index.html#gruvbox-terminal-color-scheme" title="The Terminal Programmer"><span>The Terminal Programmer</span></a></div><h1 class="title">Gruvbox terminal color scheme</h1><div class="author">Suraj N. Kurapati</div><time class="date" datetime="2016-03-03T16:37:00-08:00"> 3 March 2016 <span class="update_count"><a href="#updates" title="1 update">·→</a></span> 20 December 2018</time></header><hr /><div class="description"></div><div class="content"><p>Having used the gorgeous <a href="https://github.com/morhetz/gruvbox">gruvbox</a> color scheme in (Neo)Vim for nearly two
years, I thought: why not use the same colors in my terminal as well? And
thus we have:</p>
<img src="gruvbox-terminal-color-scheme.png" alt="the color scheme"><img src="gruvbox-terminal-color-scheme-man.png" alt="UNIX manual page"><p>To use this color scheme in <a href="https://chromium.googlesource.com/apps/libapps/+/HEAD/hterm">hterm</a>, open the <a href="https://chromium.googlesource.com/apps/libapps/+/HEAD/nassh">nassh</a> extension’s settings page,
open Chrome Developer Tools, and then run the following snippet in the console:</p>
<div class="highlight"><pre class="highlight javascript"><code><span class="nx">term_</span><span class="p">.</span><span class="nx">prefs_</span><span class="p">.</span><span class="kd">set</span><span class="p">(</span><span class="dl">"</span><span class="s2">background-color</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#282828</span><span class="dl">"</span><span class="p">);</span>
<span class="nx">term_</span><span class="p">.</span><span class="nx">prefs_</span><span class="p">.</span><span class="kd">set</span><span class="p">(</span><span class="dl">"</span><span class="s2">foreground-color</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#d5c4a1</span><span class="dl">"</span><span class="p">);</span>
<span class="nx">term_</span><span class="p">.</span><span class="nx">prefs_</span><span class="p">.</span><span class="kd">set</span><span class="p">(</span><span class="dl">"</span><span class="s2">cursor-color</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">rgba(254,128,25, 0.5)</span><span class="dl">"</span><span class="p">);</span> <span class="cm">/* #fe8019 */</span>
<span class="nx">term_</span><span class="p">.</span><span class="nx">prefs_</span><span class="p">.</span><span class="kd">set</span><span class="p">(</span><span class="dl">"</span><span class="s2">color-palette-overrides</span><span class="dl">"</span><span class="p">,</span> <span class="p">[</span><span class="dl">"</span><span class="s2">#1d2021</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#fb4934</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#b8bb26</span><span class="dl">"</span><span class="p">,</span>
<span class="dl">"</span><span class="s2">#fabd2f</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#83a598</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#d3869b</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#8ec07c</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#ebdbb2</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#1d2021</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#fb4934</span><span class="dl">"</span><span class="p">,</span>
<span class="dl">"</span><span class="s2">#b8bb26</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#fabd2f</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#83a598</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#d3869b</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#8ec07c</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#ebdbb2</span><span class="dl">"</span><span class="p">]);</span>
</code></pre></div><p>To use this color scheme in Rxvt or XTerm, save the following snippet to a file
such as <code>~/.Xdefaults</code> and then run <code>xrdb -merge</code> on that file to apply it. Any
terminals launched thereafter will use this color scheme, but not existing ones.</p>
<div class="highlight"><pre class="highlight plaintext"><code>! Colors from "gruvbox" colorscheme for Vim
! https://github.com/morhetz/gruvbox#palette
#define Ansi_0_Color #504945 /* fg2 *//* normal black */
#define Ansi_1_Color #fb4934 /* red bright *//* normal red */
#define Ansi_2_Color #b8bb26 /* green bright *//* normal green */
#define Ansi_3_Color #fabd2f /* yellow bright *//* normal yellow */
#define Ansi_4_Color #83a598 /* blue bright *//* normal blue */
#define Ansi_5_Color #d3869b /* purple bright *//* normal magenta */
#define Ansi_6_Color #8ec07c /* aqua bright *//* normal cyan */
#define Ansi_7_Color #ebdbb2 /* fg *//* normal white */
#define Ansi_8_Color #7c6f64 /* gray *//* bright black */
#define Ansi_9_Color #fb4934 /* red bright *//* bright red */
#define Ansi_10_Color #b8bb26 /* green bright *//* bright green */
#define Ansi_11_Color #fabd2f /* yellow bright *//* bright yellow */
#define Ansi_12_Color #83a598 /* blue bright *//* bright blue */
#define Ansi_13_Color #d3869b /* purple bright *//* bright magenta */
#define Ansi_14_Color #8ec07c /* aqua bright *//* bright cyan */
#define Ansi_15_Color #ebdbb2 /* fg *//* bright white */
#define Bold_Color #fabd2f /* yellow bright */
#define Italic_Color #d3869b /* purple bright */
#define Underline_Color #8ec07c /* aqua bright */
#define Reverse_Color #d65d0e /* orange */
#define Foreground_Color #d5c4a1 /* fg2 */
#define Background_Color #282828 /* bg0 */
#define Cursor_Color #fe8019 /* orange bright */
Rxvt*color0 : Ansi_0_Color/* normal black */
Rxvt*color1 : Ansi_1_Color/* normal red */
Rxvt*color2 : Ansi_2_Color/* normal green */
Rxvt*color3 : Ansi_3_Color/* normal yellow */
Rxvt*color4 : Ansi_4_Color/* normal blue */
Rxvt*color5 : Ansi_5_Color/* normal magenta */
Rxvt*color6 : Ansi_6_Color/* normal cyan */
Rxvt*color7 : Ansi_7_Color/* normal white */
Rxvt*color8 : Ansi_8_Color/* bright black */
Rxvt*color9 : Ansi_9_Color/* bright red */
Rxvt*color10 : Ansi_10_Color/* bright green */
Rxvt*color11 : Ansi_11_Color/* bright yellow */
Rxvt*color12 : Ansi_12_Color/* bright blue */
Rxvt*color13 : Ansi_13_Color/* bright magenta */
Rxvt*color14 : Ansi_14_Color/* bright cyan */
Rxvt*color15 : Ansi_15_Color/* bright white */
Rxvt*colorBD : Bold_Color
Rxvt*colorIT : Italic_Color
Rxvt*colorUL : Underline_Color
Rxvt*colorRV : Reverse_Color
Rxvt*foreground : Foreground_Color
Rxvt*background : Background_Color
Rxvt*cursorColor : Cursor_Color
XTerm*color0 : Ansi_0_Color/* normal black */
XTerm*color1 : Ansi_1_Color/* normal red */
XTerm*color2 : Ansi_2_Color/* normal green */
XTerm*color3 : Ansi_3_Color/* normal yellow */
XTerm*color4 : Ansi_4_Color/* normal blue */
XTerm*color5 : Ansi_5_Color/* normal magenta */
XTerm*color6 : Ansi_6_Color/* normal cyan */
XTerm*color7 : Ansi_7_Color/* normal white */
XTerm*color8 : Ansi_8_Color/* bright black */
XTerm*color9 : Ansi_9_Color/* bright red */
XTerm*color10 : Ansi_10_Color/* bright green */
XTerm*color11 : Ansi_11_Color/* bright yellow */
XTerm*color12 : Ansi_12_Color/* bright blue */
XTerm*color13 : Ansi_13_Color/* bright magenta */
XTerm*color14 : Ansi_14_Color/* bright cyan */
XTerm*color15 : Ansi_15_Color/* bright white */
XTerm*colorBD : Bold_Color
XTerm*colorIT : Italic_Color
XTerm*colorUL : Underline_Color
XTerm*colorRV : Reverse_Color
XTerm*foreground : Foreground_Color
XTerm*background : Background_Color
XTerm*cursorColor : Cursor_Color
! enable coloring for bold and underlined text
XTerm*vt100.boldColors : False
XTerm*vt100.colorBDMode : True
XTerm*vt100.colorULMode : True
XTerm*vt100.colorRVMode : False
XTerm*vt100.veryBoldColors : 6
</code></pre></div></div><hr /><h1 id="updates">Updates<a class="permalink" href="#updates" title="Permalink"></a></h1><aside class="update"><dl><dt class="title"><time datetime="2018-12-20T19:17:07-08:00">20 December 2018: </time></dt><dd class="content"><p>Changed blacks to grays because they were unreadable against background.</p>
</dd></dl></aside><div class="comments" id="comments"><script>var disqus_container_id = 'comments';
var disqus_title = "Gruvbox terminal color scheme";
var disqus_url = "https://sunaku.github.io/gruvbox-terminal-color-scheme.html";</script><script async="" src="https://theterminalprogrammer.disqus.com/embed.js"></script></div><hr /><footer><p class="copyright">© 2016–2018 Suraj N. Kurapati</p><p class="credits"><a href="https://github.com/sunaku/readably">Readably</a> written, <a href="https://github.com/sainnhe/everforest">Everforest</a> colored. </p><p>Like my work? 👍 Please <a href="vegan-for-life.html">spare a life</a> today as
thanks! 🐮🐷🐔🐟🙊✌💞</p>
</footer><!--[if lt IE 9]><script src="js/html5shiv.min.js"></script><script src="js/html5shiv-printshiv.min.js"></script><![endif]--><script src="index.js"></script></article></body></html>