Skip to content

Conversation

@melund
Copy link
Contributor

@melund melund commented Oct 26, 2016

The high and low intensity color codes (ansi-color names) seem to be swapped by prompt-toolkit on windows.

This PR fixes this. Now teal is the dark color, and ansiturquoise the light color. The same goes for the rest of the color names.

The high and low intensity color codes were swapped.
@jonathanslenders
Copy link
Member

@melund: Thanks for this pull request!
This was indeed incorrect.
However, this needs to be fixed as well in the following file:
https://github.com/jonathanslenders/python-prompt-toolkit/blob/master/prompt_toolkit/terminal/vt100_output.py#L27

@Carreau: Can you confirm that this is the right way to do it.

Personally, if we're about to change this, I don't mind renaming the colors as well.
As far as I understand, the colors are: black,red,green,yellow,blue,magenta,cyan,while. Either low or high intensity. Naming them fuchia, turquoise, brown, etc.. is confusing.
But this has to be fixed in Pygments as well. (Right?)

@melund
Copy link
Contributor Author

melund commented Oct 29, 2016

I am all for changing the color names if there is no good reason for what they are now. But pygments has a very slow release cycle so I think we should just fix it now in PTK.

However, this needs to be fixed as well in the following file:
https://github.com/jonathanslenders/python-prompt-toolkit/blob/master/prompt_toolkit/terminal/vt100_output.py#L27

I will do that as well.

@melund
Copy link
Contributor Author

melund commented Oct 29, 2016

@jonathanslenders. I have updated the vt100 file as well.

@Carreau
Copy link
Contributor

Carreau commented Oct 30, 2016

Yeah, I originally tried to stick to a hard compatibility between Pygments ConsoleFormatter and the ansi escape sequences. I agree that it might have been a bad idea, and I should find time to fix that in pygments itself.

The teal/navy names are imho also a bad choice as they get away from the light/dark prefix. And are confusing as well when either on light-on-dark theme of dark-on-light themes as you will always get some dark-color that are lighter than their counterpart or vice-versa.

IMHO names like blue/alternate-blue or red/Bright-red would be better suited, but it's will be hard to convince users and the pygments team (IMHO).

Here is for example the naming in iterm2 that try to stay away from light/dark naming.

screen shot 2016-10-30 at 09 15 19

@melund
Copy link
Contributor Author

melund commented Oct 31, 2016

Thanks, @Carreau. Then I think we should just fix the immediate problem in PTK now, and then change the names later. I will fix this in xonsh as well once this one is merged into PTK.

@jonathanslenders
Copy link
Member

Hi Everyone, the two commits from this pull request were merged. Thanks for this.
Next thing to be done: rename the colors.

@melund
Copy link
Contributor Author

melund commented Oct 31, 2016

@jonathanslenders .. Thanks a lot for this :)

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

Labels

None yet

3 participants