Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme customization: Custom Comment Brightness #43

Closed
arcticicestudio opened this issue Sep 30, 2017 · 2 comments
Closed

Theme customization: Custom Comment Brightness #43

arcticicestudio opened this issue Sep 30, 2017 · 2 comments
Labels
context-configuration context-syntax Hacktoberfest This repository participates in the Hacktoberfest type-feature
Milestone

Comments

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Sep 30, 2017

Introduction

The low contrast color of comments is by design of Nord and has been selected specifically to not disturb code flow and keep the focus of the developer on the code. It is totally fine that users not agree to all highlighting color assignments, everyone has different preferences. That is the reason why themes exist 😄

Anyway, since I've got a bunch of tickets on various port projects with requests to increase the comment contrast I want to make sure the theme is adaptable to fit everyone's needs, even if I'm not going to change the default color.

In most cases the problem can be solved by using local overrides to adjust specific parts of the theme like I proposed in arcticicestudio/nord-vim #26 or arcticicestudio/nord-emacs #23, but providing a official theme customization is the optimal way to achieve this.

Description

A accessibility theme customization should be added to allow users to set the brightness of comments with percentage adjustments from 0% - 20% where 0 is the default nord3 comment color. When a invalid value is passed (< 0 || > 20 || nil) the default nord3 color should be used.

The customization should be available through the nord-comment-brightness variable.

This should be a optional customization to provide a way for users to adjust the color to fit their needs. It should be a port of the reference implementation from the Nord Atom Syntax project. The values should be calculated using the LESSCSS lighten function to ensure full interoperability with other port projects that providing this theme feature.

Increased by Calculated value
0% (default) nord3
1% #4e586d
2% #505b70
3% #525d73
4% #556076
5% #576279
6% #59647c
7% #5b677f
8% #5d6982
9% #5f6c85
10% #616e88
11% #63718b
12% #66738e
13% #687591
14% #6a7894
15% #6d7a96
16% #6f7d98
17% #72809a
18% #75829c
19% #78859e
20% #7b88a1

Usage

Example to increase the comment color brightness by 15%:

(setq nord-comment-brightness 15)
@arcticicestudio arcticicestudio added this to the 0.4.0 milestone Sep 30, 2017
@arcticicestudio arcticicestudio self-assigned this Sep 30, 2017
arcticicestudio added a commit that referenced this issue Sep 30, 2017
> Description

Added a accessibility theme customization to allow users to set the
brightness of comments with percentage adjustments from 0% - 20% where 0
is the default nord3 comment color. When a invalid value is
passed (< 0 || > 20 || nil) the default nord3 color is used.

The customization is available through the nord-comment-brightness variable.

This is a optional customization to provide a way for users to adjust
the color to fit their needs: It is a port of the reference
implementation from the Nord Atom UI project. The values are calculated
using the LESSCSS lighten function to ensure full interoperability with
other port projects that providing this theme feature.

> Usage

Example to increase the comment color brightness by 15%:
  (setq nord-comment-brightness 15)

References:
nordtheme/atom-syntax#47
http://lesscss.org/functions/#color-operations-lighten

GH-43
arcticicestudio added a commit that referenced this issue Sep 30, 2017
> Description

Added a accessibility theme customization to allow users to set the
brightness of comments with percentage adjustments from 0% - 20% where 0
is the default nord3 comment color. When a invalid value is
passed (< 0 || > 20 || nil) the default nord3 color is used.

The customization is available through the nord-comment-brightness variable.

This is a optional customization to provide a way for users to adjust
the color to fit their needs: It is a port of the reference
implementation from the Nord Atom UI project. The values are calculated
using the LESSCSS lighten function to ensure full interoperability with
other port projects that providing this theme feature.

> Usage

Example to increase the comment color brightness by 15%:
  (setq nord-comment-brightness 15)

References:
nordtheme/atom-syntax#47
http://lesscss.org/functions/#color-operations-lighten

GH-43
@arcticicestudio arcticicestudio added status-in-review Hacktoberfest This repository participates in the Hacktoberfest labels Sep 30, 2017
arcticicestudio added a commit that referenced this issue Sep 30, 2017
> Description

Added a accessibility theme customization to allow users to set the
brightness of comments with percentage adjustments from 0% - 20% where 0
is the default nord3 comment color. When a invalid value is
passed (< 0 || > 20 || nil) the default nord3 color is used.

The customization is available through the nord-comment-brightness variable.

This is a optional customization to provide a way for users to adjust
the color to fit their needs: It is a port of the reference
implementation from the Nord Atom UI project. The values are calculated
using the LESSCSS lighten function to ensure full interoperability with
other port projects that providing this theme feature.

> Usage

Example to increase the comment color brightness by 15%:
  (setq nord-comment-brightness 15)

References:
nordtheme/atom-syntax#47
http://lesscss.org/functions/#color-operations-lighten

GH-43
@stardiviner
Copy link

This is really very impressive. Thanks a lot. I want this comment color highlight brightness for a long time. Because there is a issue posted before. but not improved a lot. This time is very good on comment and region (on another issue post). Thanks. REALLY.

@arcticicestudio
Copy link
Contributor Author

@stardiviner Nice to see you like it 😄

I'll merge the PR tomorrow and prepare a new release version.

arcticicestudio added a commit that referenced this issue Oct 5, 2017
…ent-brightness

Custom comment brightness customization
@arcticicestudio arcticicestudio removed their assignment Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context-configuration context-syntax Hacktoberfest This repository participates in the Hacktoberfest type-feature
Projects
None yet
Development

No branches or pull requests

2 participants