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 custom comment brightness (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/obsolete 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-emacs#custom-comment-brightness

GH-73
  • Loading branch information
arcticicestudio committed May 9, 2019
1 parent c4e0b55 commit 6a19e03
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions nord-theme.el
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,21 @@
The theme has to be reloaded after changing anything in this group."
:group 'faces)

(defcustom nord-comment-brightness 0
(defcustom nord-comment-brightness 10
"Allows to define a custom comment color brightness with percentage adjustments from 0% - 20%.
The value must be greater or equal to 0 and less or equal to 20, otherwise the default 'nord3' color is used."
As of version 0.4.0, this variable is obsolete/deprecated and has no effect anymore 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-emacs/issues/73 for more details."
:type 'integer
:group 'nord)

(make-obsolete-variable
'nord-comment-brightness
"The custom color brightness feature 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-emacs/issues/73 for more details."
"0.4.0")

(defcustom nord-region-highlight nil
"Allows to set a region highlight style based on the Nord components.
Valid styles are
Expand All @@ -70,12 +79,18 @@

(defun nord-theme--brightened-comment-color (percent)
"Returns the brightened comment color for the given percent.
The value must be greater or equal to 0 and less or equal to 20, otherwise the default 'nord3' color is used."
(if (and (integerp percent)
(>= percent 0)
(<= percent 20))
(nth percent nord-theme--brightened-comments)
(nth 0 nord-theme--brightened-comments)))
The value must be greater or equal to 0 and less or equal to 20, otherwise the default 'nord3' color is used.
As of version 0.4.0, this function is obsolete/deprecated and has no effect anymore 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-emacs/issues/73 for more details."
(nth 10 nord-theme--brightened-comments))

(make-obsolete
'nord-theme--brightened-comment-color
"The custom color brightness feature 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-emacs/issues/73 for more details."
"0.4.0")

;;;; Color Constants
(let ((class '((class color) (min-colors 89)))
Expand Down

0 comments on commit 6a19e03

Please sign in to comment.