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

Intensity is flipped? #29

Open
shanselman opened this issue Jun 17, 2017 · 7 comments
Open

Intensity is flipped? #29

shanselman opened this issue Jun 17, 2017 · 7 comments

Comments

@shanselman
Copy link

Win32 puts the intensity on the upper colors so that intense/bold/light are to the right here:
image
But concfg (at least for solarized) reverses that, so that apps that ask for intense or bold get the opposite. Is that an issue just with your solarized sample, or is it reversed in all of concfg?
image

@lukesampson
Copy link
Owner

There's nothing in concfg that requires the intensity to be reversed, but it looks like most of the themes are configured that way currently.

The reason for this is that most of the themes are ported from Unix where colors seem to be named with a "bright" variant, to Windows where the colors have a "dark" variant (at least they're named "dark" in PowerShell).

The names were taken to mean that bright should be lighter than dark. Now that you're pointing it out, it seems like it might have been better to treat both "bright" and "dark" as "bold".

@lukesampson
Copy link
Owner

Sorry, I got that backwards. I'd forgotten we went through this whole thing 3 years ago.

Originally we went with the convention that bright = dark (the way most themes are set up now).

We tried inverting it so bright > dark, like you're suggesting — that seemed to break at least NodeJS and Grunt which use the bright = dark convention. So we switched back to bright = dark.

It sounds like PowerShell has assumed the bright > dark convention, which conflicts with other well-known programs.

Confg's Solarized theme has now been mangled to kind of support both PowerShell and other programs.

@shanselman
Copy link
Author

Gotcha. OK, good to know. Thanks for the info! Not sure about node or powershell, but I can tell you that Windows itself is dark/bright per their APIs. I think @bitcrazed may have something to say about it.

@lukesampson
Copy link
Owner

Thanks Scott. I'd appreciate any suggestions or advice about the best way to do it.

@sheldonhull
Copy link

I manually changed the solarized config file to the following to force the background color to match, and make it readable. Not ideal, but works for my use case.

Note I updated the size to be a little more useful for powershell output, and my personal font of choice Fira Code is here so replace with yours if you want.

 {
	"black":"#002b36",
	"dark_blue":"#268bd2",
	"dark_green":"#859900",
	"dark_cyan":"#002b36",
	"dark_red":"#dc322f",
	"dark_magenta":"#d33682",
	"dark_yellow":"#b58900",
	"gray":"#eee8d5",
	"dark_gray":"#839496",
	"blue":"#839496",
	"green":"#859900",
	"cyan":"#93a1a1",
	"red":"#cb4b16",
	"magenta":"#6c71c4",
	"yellow":"#859900",
	"white":"#fdf6e3",

	"screen_colors":"blue,black",
	"popup_colors":"yellow,white",

	"font_face":"Fira Code",
	"font_true_type":true,
	"font_size":"0x16",
	"font_weight":500,

	"cursor_size":"small",

	"window_size":"120x40",
	"screen_buffer_size":"80x3000",

	"command_history_length":200,
	"num_history_buffers":4,

	"quick_edit":true,
	"insert_mode":true,
	"fullscreen":false,

	"load_console_IME":true
}


@rbeesley
Copy link

@lukesampson I (re)did most of the mapping for cmd-colors-solarized. My ordering came from looking at different implementations for terminal applications such as PuTTY, and then working backwards from that. The implementation that we settled with was that br* = Dark*. This creates some interesting mapping problems when the Terminal has colors which don't match base01 for example. In the README.md and screenshots, you can see how these were mapped. Basically, blue, green, cyan, red, magenta, and yellow were mapped to their respective colors while orange was mapped to its closest match "dark red" and violet was mapped to its closest match "dark magenta". The grayscale was harder to map, but again I was mostly matching other configurations. There's some logic in that color table values 0, 7, 8, and F have some significance in their brightness, and 0, 1, 6, and F have some significance in console mapping. What was left fell out of that, but again it closely followed other implementations.

@lukesampson
Copy link
Owner

Thank you @sheldonhull and @rbeesley.

I like the thoroughness of cmd-colors-solarized, and how you use a script to get PSReadLine to work.

Maybe the thing to do to improve concfg is to set the PSReadLine settings in the user's $profile when running concfg import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants