diff --git a/colors/solarized8.vim b/colors/solarized8.vim index 69d82fa..f30fad5 100644 --- a/colors/solarized8.vim +++ b/colors/solarized8.vim @@ -4,9 +4,9 @@ " Maintainer: Lifepillar " URL: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Change: 2026 Jan 19 +" Last Change: 2026 Mar 01 -" Generated by Colortemplate v3.0.0-beta10 +" Generated by Colortemplate v3.0.0-rc1 hi clear let g:colors_name = 'solarized8' @@ -14,15 +14,7 @@ let g:colors_name = 'solarized8' let hs_highlight_boolean=1 let hs_highlight_delimiters=1 -" set color capability order: gui --> user request (guarded) --> terminal -if has('gui_running') - let s:t_Co = 16777216 -elseif get(g:, 'solarized_use16', 0) && str2nr(&t_Co) >= 16 - let s:t_Co = 16 -else - let s:t_Co = str2nr(&t_Co) -endif - +let s:t_Co = has('gui_running') ? 16777216 : get(g:, 'solarized_use16', 0) && str2nr(&t_Co) >= 16 ? 16 : str2nr(&t_Co) let s:tgc = has('termguicolors') && &termguicolors hi! link Boolean Constant diff --git a/colors/solarized8_flat.vim b/colors/solarized8_flat.vim index caa0c3b..6902de0 100644 --- a/colors/solarized8_flat.vim +++ b/colors/solarized8_flat.vim @@ -4,9 +4,9 @@ " Maintainer: Lifepillar " URL: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Change: 2026 Jan 19 +" Last Change: 2026 Mar 01 -" Generated by Colortemplate v3.0.0-beta10 +" Generated by Colortemplate v3.0.0-rc1 hi clear let g:colors_name = 'solarized8_flat' @@ -14,15 +14,7 @@ let g:colors_name = 'solarized8_flat' let hs_highlight_boolean=1 let hs_highlight_delimiters=1 -" set color capability order: gui --> user request (guarded) --> terminal -if has('gui_running') - let s:t_Co = 16777216 -elseif get(g:, 'solarized_use16', 0) && str2nr(&t_Co) >= 16 - let s:t_Co = 16 -else - let s:t_Co = str2nr(&t_Co) -endif - +let s:t_Co = has('gui_running') ? 16777216 : get(g:, 'solarized_use16', 0) && str2nr(&t_Co) >= 16 ? 16 : str2nr(&t_Co) let s:tgc = has('termguicolors') && &termguicolors hi! link Boolean Constant diff --git a/colors/solarized8_high.vim b/colors/solarized8_high.vim index 0cba664..53dc659 100644 --- a/colors/solarized8_high.vim +++ b/colors/solarized8_high.vim @@ -4,9 +4,9 @@ " Maintainer: Lifepillar " URL: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Change: 2026 Jan 19 +" Last Change: 2026 Mar 01 -" Generated by Colortemplate v3.0.0-beta10 +" Generated by Colortemplate v3.0.0-rc1 hi clear let g:colors_name = 'solarized8_high' @@ -14,15 +14,7 @@ let g:colors_name = 'solarized8_high' let hs_highlight_boolean=1 let hs_highlight_delimiters=1 -" set color capability order: gui --> user request (guarded) --> terminal -if has('gui_running') - let s:t_Co = 16777216 -elseif get(g:, 'solarized_use16', 0) && str2nr(&t_Co) >= 16 - let s:t_Co = 16 -else - let s:t_Co = str2nr(&t_Co) -endif - +let s:t_Co = has('gui_running') ? 16777216 : get(g:, 'solarized_use16', 0) && str2nr(&t_Co) >= 16 ? 16 : str2nr(&t_Co) let s:tgc = has('termguicolors') && &termguicolors hi! link Boolean Constant diff --git a/colors/solarized8_low.vim b/colors/solarized8_low.vim index b9e225f..ab25df8 100644 --- a/colors/solarized8_low.vim +++ b/colors/solarized8_low.vim @@ -4,9 +4,9 @@ " Maintainer: Lifepillar " URL: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Change: 2026 Jan 19 +" Last Change: 2026 Mar 01 -" Generated by Colortemplate v3.0.0-beta10 +" Generated by Colortemplate v3.0.0-rc1 hi clear let g:colors_name = 'solarized8_low' @@ -14,15 +14,7 @@ let g:colors_name = 'solarized8_low' let hs_highlight_boolean=1 let hs_highlight_delimiters=1 -" set color capability order: gui --> user request (guarded) --> terminal -if has('gui_running') - let s:t_Co = 16777216 -elseif get(g:, 'solarized_use16', 0) && str2nr(&t_Co) >= 16 - let s:t_Co = 16 -else - let s:t_Co = str2nr(&t_Co) -endif - +let s:t_Co = has('gui_running') ? 16777216 : get(g:, 'solarized_use16', 0) && str2nr(&t_Co) >= 16 ? 16 : str2nr(&t_Co) let s:tgc = has('termguicolors') && &termguicolors hi! link Boolean Constant diff --git a/doc/solarized8.txt b/doc/solarized8.txt index ee3f9bf..bfdd78a 100644 --- a/doc/solarized8.txt +++ b/doc/solarized8.txt @@ -1,4 +1,4 @@ -*solarized8.txt* For Vim version 9 Last change: 2026 Jan 19 +*solarized8.txt* For Vim version 9 Last change: 2026 Mar 01 Solarized 8 color scheme @@ -52,6 +52,13 @@ Set to 1 if you want a transparent background. Takes effect only in the terminal. > let g:solarized_termtrans = 0 +< + *g:solarized_use16* +Set to 1 to use ANSI colors in the range 0–15 even if your terminal supports +more colors. This option has no effect in GUI Vim or if your terminal has less +than 16 colors. +> + let g:solarized_use16 = 0 < *g:solarized_visibility* Tweak the visibility of a few elements. Allowed values are `"normal"` diff --git a/templates/_global.colortemplate b/templates/_global.colortemplate index 5eb2cd8..3d93115 100644 --- a/templates/_global.colortemplate +++ b/templates/_global.colortemplate @@ -4,6 +4,7 @@ Background: any Include: _linked_groups.colortemplate +#const t_Co = has('gui_running') ? 16777216 : get(g:, '@prefix_use16', 0) && str2nr(&t_Co) >= 16 ? 16 : str2nr(&t_Co) #const italics = get(g:, '@prefix_italics', 1) && (has('gui_running') || has('nvim') || (&t_ZH != '' && &t_ZH != '' && !has('win32'))) #const termtrans = get(g:, '@prefix_termtrans', 0) && !has('gui_running') #const visibility = get(g:, '@prefix_visibility', 'normal') diff --git a/templates/_help.colortemplate b/templates/_help.colortemplate index c23afb3..66bb3d0 100644 --- a/templates/_help.colortemplate +++ b/templates/_help.colortemplate @@ -53,6 +53,13 @@ Set to 1 if you want a transparent background. Takes effect only in the terminal. > let g:@prefix_termtrans = 0 +< + *g:@prefix_use16* +Set to 1 to use ANSI colors in the range 0–15 even if your terminal supports +more colors. This option has no effect in GUI Vim or if your terminal has less +than 16 colors. +> + let g:@prefix_use16 = 0 < *g:@prefix_visibility* Tweak the visibility of a few elements. Allowed values are `"normal"`