Explorar el Código

Introduced contrast option

morhetz hace 12 años
padre
commit
37435aa623
Se han modificado 5 ficheros con 61 adiciones y 0 borrados
  1. 5 0
      README.md
  2. BIN
      colors/.gruvbox.vim.swo
  3. 20 0
      colors/gruvbox.vim
  4. 18 0
      gruvbox_256palette.sh
  5. 18 0
      gruvbox_256palette_osx.sh

+ 5 - 0
README.md

@@ -25,6 +25,7 @@ Screenshots
 Features
 --------
 
+* Lots of style-customization options (contrast, color invertion, italics usage etc.)
 * Extended filetype highlighting: Html, Vim, Clojure
 * Supported plugins: [EasyMotion][], [Indent Guides][], [Rainbow Parentheses][], [Airline][], [GitGutter][], [Signify][], [ShowMarks][], [Signature][], [Syntastic][]
 
@@ -126,6 +127,10 @@ default: `256`
 
 [4]: https://github.com/morhetz/gruvbox/issues/4
 
+### g:gruvbox_contrast
+Possible values is `soft`, `medium` and `hard`.
+default: `medium`
+
 ### g:gruvbox_hls_cursor
 Changes cursor background while search is highlighted. Possible values are any of gruvbox palette.  
 default: `orange`

BIN
colors/.gruvbox.vim.swo


+ 20 - 0
colors/gruvbox.vim

@@ -69,6 +69,10 @@ if !exists('g:gruvbox_invert_selection')
 	let g:gruvbox_invert_selection=1
 endif
 
+if !exists('g:gruvbox_contrast')
+	let g:gruvbox_contrast='medium'
+endif
+
 let s:is_dark=(&background == 'dark')
 
 " }}}
@@ -113,6 +117,14 @@ if s:is_dark
 		let s:gb.aqua   = ['8ec07c', 14]
 		let s:gb.light1 = ['ebdbb2', 15]
 	endif
+
+	if g:gruvbox_contrast == 'soft'
+		let s:gb.dark0  = ['32302f', 236]     " 50-48-47
+	endif
+
+	if g:gruvbox_contrast == 'hard'
+		let s:gb.dark0  = ['1d2021', 234]     " 29-32-33
+	endif
 else
 	let s:gb.dark0  = ['fdf4c1', 229]     " 253-244-193
 	let s:gb.dark1  = ['ebdbb2', 223]     " 235-219-178
@@ -150,6 +162,14 @@ else
 		let s:gb.aqua   = ['427b58', 14]
 		let s:gb.light1 = ['3c3836', 15]
 	endif
+
+	if g:gruvbox_contrast == 'soft'
+		let s:gb.dark0  = ['f4e8ba', 228]     " 244-232-186
+	endif
+
+	if g:gruvbox_contrast == 'hard'
+		let s:gb.dark0  = ['ffffc8', 230]     " 255-255-200
+	endif
 endif
 
 " }}}

+ 18 - 0
gruvbox_256palette.sh

@@ -2,6 +2,9 @@
 
 if [ "${TERM%%-*}" = "screen" ]; then
 	if [ -n "$TMUX" ]; then
+		echo -ne "\ePtmux;\e\e]4;236;rgb:32/30/2f\a\e\\"
+		echo -ne "\ePtmux;\e\e]4;234;rgb:1d/20/21\a\e\\"
+
 		echo -ne "\ePtmux;\e\e]4;235;rgb:28/28/28\a\e\\"
 		echo -ne "\ePtmux;\e\e]4;237;rgb:3c/38/36\a\e\\"
 		echo -ne "\ePtmux;\e\e]4;239;rgb:50/49/45\a\e\\"
@@ -11,6 +14,9 @@ if [ "${TERM%%-*}" = "screen" ]; then
 		echo -ne "\ePtmux;\e\e]4;244;rgb:92/83/74\a\e\\"
 		echo -ne "\ePtmux;\e\e]4;245;rgb:92/83/74\a\e\\"
 
+		echo -ne "\ePtmux;\e\e]4;228;rgb:f4/e8/ba\a\e\\"
+		echo -ne "\ePtmux;\e\e]4;230;rgb:ff/ff/c8\a\e\\"
+
 		echo -ne "\ePtmux;\e\e]4;229;rgb:fd/f4/c1\a\e\\"
 		echo -ne "\ePtmux;\e\e]4;223;rgb:eb/db/b2\a\e\\"
 		echo -ne "\ePtmux;\e\e]4;250;rgb:d5/c4/a1\a\e\\"
@@ -33,6 +39,9 @@ if [ "${TERM%%-*}" = "screen" ]; then
 		echo -ne "\ePtmux;\e\e]4;66;rgb:42/7b/58\a\e\\"
 		echo -ne "\ePtmux;\e\e]4;130;rgb:af/3a/03\a\e\\"
 	else
+		echo -ne "\eP\e]4;236;rgb:32/30/2f\a\e\\"
+		echo -ne "\eP\e]4;234;rgb:1d/20/21\a\e\\"
+
 		echo -ne "\eP\e]4;235;rgb:28/28/28\a\e\\"
 		echo -ne "\eP\e]4;237;rgb:3c/38/36\a\e\\"
 		echo -ne "\eP\e]4;239;rgb:50/49/45\a\e\\"
@@ -42,6 +51,9 @@ if [ "${TERM%%-*}" = "screen" ]; then
 		echo -ne "\eP\e]4;244;rgb:92/83/74\a\e\\"
 		echo -ne "\eP\e]4;245;rgb:92/83/74\a\e\\"
 
+		echo -ne "\eP\e]4;228;rgb:f4/e8/ba\a\e\\"
+		echo -ne "\eP\e]4;230;rgb:ff/ff/c8\a\e\\"
+
 		echo -ne "\eP\e]4;229;rgb:fd/f4/c1\a\e\\"
 		echo -ne "\eP\e]4;223;rgb:eb/db/b2\a\e\\"
 		echo -ne "\eP\e]4;250;rgb:d5/c4/a1\a\e\\"
@@ -65,6 +77,9 @@ if [ "${TERM%%-*}" = "screen" ]; then
 		echo -ne "\eP\e]4;130;rgb:af/3a/03\a\e\\"
 	fi
 else
+	echo -ne "\e]4;236;rgb:32/30/2f\e\\"
+	echo -ne "\e]4;234;rgb:1d/20/21\e\\"
+
 	echo -ne "\e]4;235;rgb:28/28/28\e\\"
 	echo -ne "\e]4;237;rgb:3c/38/36\e\\"
 	echo -ne "\e]4;239;rgb:50/49/45\e\\"
@@ -74,6 +89,9 @@ else
 	echo -ne "\e]4;244;rgb:92/83/74\e\\"
 	echo -ne "\e]4;245;rgb:92/83/74\e\\"
 
+	echo -ne "\e]4;228;rgb:f4/e8/ba\e\\"
+	echo -ne "\e]4;230;rgb:ff/ff/c8\e\\"
+
 	echo -ne "\e]4;229;rgb:fd/f4/c1\e\\"
 	echo -ne "\e]4;223;rgb:eb/db/b2\e\\"
 	echo -ne "\e]4;250;rgb:d5/c4/a1\e\\"

+ 18 - 0
gruvbox_256palette_osx.sh

@@ -2,6 +2,9 @@
 
 if [ "${TERM%%-*}" = "screen" ]; then
 	if [ -n "$TMUX" ]; then
+		echo -ne "\x1bPtmux;\x1b\x1b]4;236;rgb:32/30/2f\a\x1b\\"
+		echo -ne "\x1bPtmux;\x1b\x1b]4;234;rgb:1d/20/21\a\x1b\\"
+
 		echo -ne "\x1bPtmux;\x1b\x1b]4;235;rgb:28/28/28\a\x1b\\"
 		echo -ne "\x1bPtmux;\x1b\x1b]4;237;rgb:3c/38/36\a\x1b\\"
 		echo -ne "\x1bPtmux;\x1b\x1b]4;239;rgb:50/49/45\a\x1b\\"
@@ -11,6 +14,9 @@ if [ "${TERM%%-*}" = "screen" ]; then
 		echo -ne "\x1bPtmux;\x1b\x1b]4;244;rgb:92/83/74\a\x1b\\"
 		echo -ne "\x1bPtmux;\x1b\x1b]4;245;rgb:92/83/74\a\x1b\\"
 
+		echo -ne "\x1bPtmux;\x1b\x1b]4;228;rgb:f4/e8/ba\a\x1b\\"
+		echo -ne "\x1bPtmux;\x1b\x1b]4;230;rgb:ff/ff/c8\a\x1b\\"
+
 		echo -ne "\x1bPtmux;\x1b\x1b]4;229;rgb:fd/f4/c1\a\x1b\\"
 		echo -ne "\x1bPtmux;\x1b\x1b]4;223;rgb:eb/db/b2\a\x1b\\"
 		echo -ne "\x1bPtmux;\x1b\x1b]4;250;rgb:d5/c4/a1\a\x1b\\"
@@ -33,6 +39,9 @@ if [ "${TERM%%-*}" = "screen" ]; then
 		echo -ne "\x1bPtmux;\x1b\x1b]4;66;rgb:42/7b/58\a\x1b\\"
 		echo -ne "\x1bPtmux;\x1b\x1b]4;130;rgb:af/3a/03\a\x1b\\"
 	else
+		echo -ne "\x1bP\x1b]4;236;rgb:32/30/2f\a\x1b\\"
+		echo -ne "\x1bP\x1b]4;234;rgb:1d/20/21\a\x1b\\"
+
 		echo -ne "\x1bP\x1b]4;235;rgb:28/28/28\a\x1b\\"
 		echo -ne "\x1bP\x1b]4;237;rgb:3c/38/36\a\x1b\\"
 		echo -ne "\x1bP\x1b]4;239;rgb:50/49/45\a\x1b\\"
@@ -42,6 +51,9 @@ if [ "${TERM%%-*}" = "screen" ]; then
 		echo -ne "\x1bP\x1b]4;244;rgb:92/83/74\a\x1b\\"
 		echo -ne "\x1bP\x1b]4;245;rgb:92/83/74\a\x1b\\"
 
+		echo -ne "\x1bP\x1b]4;228;rgb:f4/e8/ba\a\x1b\\"
+		echo -ne "\x1bP\x1b]4;230;rgb:ff/ff/c8\a\x1b\\"
+
 		echo -ne "\x1bP\x1b]4;229;rgb:fd/f4/c1\a\x1b\\"
 		echo -ne "\x1bP\x1b]4;223;rgb:eb/db/b2\a\x1b\\"
 		echo -ne "\x1bP\x1b]4;250;rgb:d5/c4/a1\a\x1b\\"
@@ -65,6 +77,9 @@ if [ "${TERM%%-*}" = "screen" ]; then
 		echo -ne "\x1bP\x1b]4;130;rgb:af/3a/03\a\x1b\\"
 	fi
 else
+	echo -ne "\x1b]4;236;rgb:32/30/2f\x1b\\"
+	echo -ne "\x1b]4;234;rgb:1d/20/21\x1b\\"
+
 	echo -ne "\x1b]4;235;rgb:28/28/28\x1b\\"
 	echo -ne "\x1b]4;237;rgb:3c/38/36\x1b\\"
 	echo -ne "\x1b]4;239;rgb:50/49/45\x1b\\"
@@ -74,6 +89,9 @@ else
 	echo -ne "\x1b]4;244;rgb:92/83/74\x1b\\"
 	echo -ne "\x1b]4;245;rgb:92/83/74\x1b\\"
 
+	echo -ne "\x1b]4;228;rgb:f4/e8/ba\x1b\\"
+	echo -ne "\x1b]4;230;rgb:ff/ff/c8\x1b\\"
+
 	echo -ne "\x1b]4;229;rgb:fd/f4/c1\x1b\\"
 	echo -ne "\x1b]4;223;rgb:eb/db/b2\x1b\\"
 	echo -ne "\x1b]4;250;rgb:d5/c4/a1\x1b\\"