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

Review: color consistency #108

Open
romainl opened this issue Nov 8, 2021 · 7 comments
Open

Review: color consistency #108

romainl opened this issue Nov 8, 2021 · 7 comments
Labels
remake Remake of a legacy colorscheme v:gui Supports GUI Vim v:tui Supports TUI Vim v:16 colors Supports 16color terminal emulators v:256 colors Supports 256color terminal emulators

Comments

@romainl
Copy link
Collaborator

romainl commented Nov 8, 2021

Make sure that any given GUI color is always translated to the same 256c and 16c.

For example, LightMagenta, which doesn't exist in rgb.txt:

 co/evening.colortemplate|17 col 8| Color: lightmagenta  #ffa0a0           217               magenta
 co/shine.colortemplate|38 col 8| Color: LightMagenta#ff83fa        213            13
@romainl romainl added remake Remake of a legacy colorscheme v:16 colors Supports 16color terminal emulators v:256 colors Supports 256color terminal emulators v:gui Supports GUI Vim v:tui Supports TUI Vim labels Nov 8, 2021
@lifepillar
Copy link
Contributor

Or give different colors different names?

@romainl
Copy link
Collaborator Author

romainl commented Nov 9, 2021

@lifepillar What do you mean?

The issue, here, is that a given gui color can have different 256c and/or 16c translations across colorschemes. This is an inconsistency issue that should be dealt with.

@lifepillar
Copy link
Contributor

Isn't that two different colors (#ffa0a0 and #ff83fa) which have been assigned the same symbolic name (LightMagenta)? So, one possibility would be to rename one color.

@romainl
Copy link
Collaborator Author

romainl commented Nov 10, 2021

No.

One symbolic name, LightMagenta, is used in two original colorschemes but it was erroneously translated to two different values in two different remakes. That's the issue to address… and there are other similar cases.

Don't worry if you don't get it, this issue is just a memo for later.

@romainl
Copy link
Collaborator Author

romainl commented Nov 12, 2021

Below are the tables of conflicting Color: statements found in colortemplate/, grouped by name for readability.

Name Hex 256c 16c 256c (fixed) 16c (fixed)
blue #0000ff 21 blue
blue #0000ff 21 darkblue
blue #0000ff 21 blue
blue #0000ff 21 darkblue
blue #0000ff 63 blue
blue #0030ff 27 blue
blue #005faf 25 blue
blue #0087ff 33 blue
blue #5fafff 75 blue
Name Hex 256c 16c 256c (fixed) 16c (fixed)
cyan #00ffff 51 cyan
cyan #5fffff 87 cyan
cyan #90fff0 123 cyan
Name Hex 256c 16c 256c (fixed) 16c (fixed)
darkblue #000087 18 darkblue
darkblue #00008b 18 darkblue
darkblue #00008b 20 darkblue
darkblue #006faf 25 darkblue
darkblue #0087af 31 darkblue
Name Hex 256c 16c 256c (fixed) 16c (fixed)
darkcyan #008787 30 darkcyan
darkcyan #008b8b 30 darkcyan
darkcyan #008b8b 30 darkcyan
darkcyan #008b8b 44 darkcyan
Name Hex 256c 16c 256c (fixed) 16c (fixed)
darkgray #878787 102 darkgray
darkgrey #767676 243 darkgrey
darkgrey #a9a9a9 145 darkgrey
darkgrey #a9a9a9 145 grey
darkgrey #a9a9a9 248 grey
Name Hex 256c 16c 256c (fixed) 16c (fixed)
darkmag #8b008b 90 darkmagenta
darkmagenta #870087 90 darkmagenta
darkmagenta #8b008b 164 darkmagenta
darkmagenta #8b008b 90 darkmagenta
Name Hex 256c 16c 256c (fixed) 16c (fixed)
darkred #870000 88 darkred
darkred #8b0000 88 darkred
darkred #d14a14 166 darkred
Name Hex 256c 16c 256c (fixed) 16c (fixed)
green #00ff00 46 green
green #90f020 118 green
Name Hex 256c 16c 256c (fixed) 16c (fixed)
gray #bcbcbc 250 gray
grey #808080 102 darkgrey
grey #bebebe 248 grey
grey #bebebe 250 grey
grey #bebebe 250 gray
grey #bebebe 250 grey
Name Hex 256c 16c 256c (fixed) 16c (fixed)
grey40 #666666 241 darkgray
grey40 #666666 241 darkgrey
grey40 #666666 242 grey
grey40 #666666 59 darkgrey
grey40 #666666 59 darkgrey
Name Hex 256c 16c 256c (fixed) 16c (fixed)
lightblue #287eff 33 blue
lightblue #add8e6 152 darkcyan
lightblue #add8e6 153 blue
lightblue #add8e6 153 lightblue
Name Hex 256c 16c 256c (fixed) 16c (fixed)
lightgrey #c0c0c0 252 grey
lightgrey #d3d3d3 252 gray
lightgrey #dadada 253 grey
Name Hex 256c 16c 256c (fixed) 16c (fixed)
lightmag #ff80ff 213 magenta
lightmagenta #ffbbff 219 magenta
Name Hex 256c 16c 256c (fixed) 16c (fixed)
lightred #ffa0a0 217 red
lightred #ffafaf 217 red
Name Hex 256c 16c 256c (fixed) 16c (fixed)
magenta #d787d7 176 magenta
magenta #ff00ff 201 darkmagenta
magenta #ff00ff 201 magenta
magenta #ff80ff 201 darkmagenta
Name Hex 256c 16c 256c (fixed) 16c (fixed)
red #d70000 160 red
red #ff0000 196 darkred
red #ff0000 196 red
red #ff5f5f 203 red
Name Hex 256c 16c 256c (fixed) 16c (fixed)
seagreen #2e8b57 121 darkgreen
seagreen #2e8b57 29 darkgreen
seagreen #2e8b57 29 darkgreen
Name Hex 256c 16c 256c (fixed) 16c (fixed)
slateblue #6a5acd 62 blue
slateblue #6a5acd 62 darkmagenta
Name Hex 256c 16c 256c (fixed) 16c (fixed)
steelblue #4682b4 67 blue
Name Hex 256c 16c 256c (fixed) 16c (fixed)
violet #8080ff 105 blue
Name Hex 256c 16c 256c (fixed) 16c (fixed)
white #ffffff 15 white
white #ffffff 231 white
Name Hex 256c 16c 256c (fixed) 16c (fixed)
yellow #ffdf00 220 yellow
yellow #ffff00 226 darkyellow
yellow #ffff00 226 yellow
yellow #ffff60 227 yellow

@lifepillar
Copy link
Contributor

The issue, here, is that a given gui color can have different 256c and/or 16c translations across colorschemes

In Colortemplate's documentation I wrote:

the "most similar" terminal color [to a hex color] may not necessarily be the "best looking" color, because the overall look&feel of a color scheme ultimately depends on the interactions among all the colors.

If you take blue as an example, #0000ff is approximated with (21,blue), (21,darkblue), and (63,blue) in different color schemes. That is perfectly fine, because what looks best in an approximated color scheme very much depends on how all the colors interact. Requiring that #0000ff be always approximated with the same 256/16c color would produce suboptimal results.

@romainl
Copy link
Collaborator Author

romainl commented Nov 12, 2021

The problem with this line of thinking is that the author of the original colorscheme deliberately chose a specific color with a fixed, standardized value. People use those colorschemes in the real world and I think that the pros and cons of changes like the ones you allude to must be weighted carefully. The originals are messy and we can't seriously claim that our remakes are an improvement if they are even more messy than the originals.

Also, I think that we have more leeway in 16c land because of the inherent limitations of that color space. The constraints we deal with are much much difficult. In 256c, on the other hand, the technical limits/constraints are less stringent so we should strive to approximate the original as much as possible.

Moreover, this project is a chance to replace an awful mess with a working "system", we shouldn't let it slip.

romainl added a commit that referenced this issue Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
remake Remake of a legacy colorscheme v:gui Supports GUI Vim v:tui Supports TUI Vim v:16 colors Supports 16color terminal emulators v:256 colors Supports 256color terminal emulators
Projects
None yet
Development

No branches or pull requests

2 participants