Skip to content

Commit

Permalink
Comment Color Brightness
Browse files Browse the repository at this point in the history
-> Please see nordtheme/nord#94 for all
   details about this design change decision.

Increased the comment color (`nord3`) brightness by 10% from a lightness
level of ~35% to ~45%.

This change also deprecates the comment contrast (1) configuration.
It is not necessary anymore for users to increase the brightness on
their own when the default color has been increased by default.
A deprecation warning will be shown to notify all users who have set a
custom value for the `g:nord_comment_brightness` configuration variable.

References:
  (1)  https://github.com/arcticicestudio/nord-vim#comment-contrast

GH-145
  • Loading branch information
arcticicestudio committed Mar 21, 2019
1 parent 096ff7b commit def9d75
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions colors/nord.vim
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ let s:nord0_gui = "#2E3440"
let s:nord1_gui = "#3B4252"
let s:nord2_gui = "#434C5E"
let s:nord3_gui = "#4C566A"
let s:nord3_gui_bright = "#616E88"
let s:nord4_gui = "#D8DEE9"
let s:nord5_gui = "#E5E9F0"
let s:nord6_gui = "#ECEFF4"
Expand Down Expand Up @@ -100,8 +101,17 @@ if !exists('g:nord_uniform_status_lines')
let g:nord_uniform_status_lines = 0
endif

if !exists("g:nord_comment_brightness")
let g:nord_comment_brightness = 0
function! s:logWarning(msg)
echohl WarningMsg
echomsg 'nord: warning: ' . a:msg
echohl None
endfunction

if exists("g:nord_comment_brightness")
call s:logWarning('Variable g:nord_comment_brightness has been deprecated and will be removed in version 1.0.0!' .
\' The comment color brightness has been increased by 10% by default.' .
\' Please see https://github.com/arcticicestudio/nord-vim/issues/145 for more details.')
let g:nord_comment_brightness = 10
endif

if !exists("g:nord_uniform_diff_background")
Expand Down Expand Up @@ -245,7 +255,7 @@ call s:hi("VertSplit", s:nord2_gui, s:nord1_gui, s:nord3_term, s:nord1_term, "NO
"+----------------------+
call s:hi("Boolean", s:nord9_gui, "", s:nord9_term, "", "", "")
call s:hi("Character", s:nord14_gui, "", s:nord14_term, "", "", "")
call s:hi("Comment", s:nord3_gui_brightened[g:nord_comment_brightness], "", s:nord3_term, "", s:italicize_comments, "")
call s:hi("Comment", s:nord3_gui_bright, "", s:nord3_term, "", s:italicize_comments, "")
call s:hi("Conditional", s:nord9_gui, "", s:nord9_term, "", "", "")
call s:hi("Constant", s:nord4_gui, "", "NONE", "", "", "")
call s:hi("Define", s:nord9_gui, "", s:nord9_term, "", "", "")
Expand Down Expand Up @@ -471,7 +481,7 @@ hi! link vimFunction Function
hi! link vimUserFunc Function

call s:hi("xmlAttrib", s:nord7_gui, "", s:nord7_term, "", "", "")
call s:hi("xmlCdataStart", s:nord3_gui, "", s:nord3_term, "", "bold", "")
call s:hi("xmlCdataStart", s:nord3_gui_bright, "", s:nord3_term, "", "bold", "")
call s:hi("xmlNamespace", s:nord7_gui, "", s:nord7_term, "", "", "")
hi! link xmlAttribPunct Delimiter
hi! link xmlCdata Comment
Expand Down

0 comments on commit def9d75

Please sign in to comment.