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

Creating one dark style #1924

Merged
merged 4 commits into from
Nov 21, 2021
Merged

Creating one dark style #1924

merged 4 commits into from
Nov 21, 2021

Conversation

TobiZog
Copy link
Contributor

@TobiZog TobiZog commented Oct 21, 2021

I creating a new style, orientated by the "One Dark Theme" for Atom. I hope you will add it to the package.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@Anteru Anteru added the update needed Waiting for an update from the PR/issue creator label Oct 23, 2021
@Anteru
Copy link
Collaborator

Anteru commented Oct 23, 2021

Thanks for the contribution! Looks like it's missing the license/copyright, hence failing the checks. Can you fix that, please?

@Anteru Anteru added the A-theming area: changes to themes label Oct 23, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@TobiZog
Copy link
Contributor Author

TobiZog commented Oct 23, 2021

I corrected this. I hope it will pass now.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@TobiZog
Copy link
Contributor Author

TobiZog commented Nov 12, 2021

Can you please approve this?

@Anteru Anteru merged commit 2d3ea1e into pygments:master Nov 21, 2021
@Anteru Anteru added this to the 2.11.0 milestone Nov 21, 2021
@Anteru
Copy link
Collaborator

Anteru commented Nov 21, 2021

Merged, thanks!

@ranelpadon
Copy link
Contributor

@TobiZog @Anteru Thanks a lot for this One Dark theme, which is my favorite. This is timely PR also since I'm tinkering with IPython/Pygments recently, and will write an article for it. Hopefully, this will be released to PyPI asap since the last release was still 2.10.0 (August 15), and so that I could just say pip install pygments to the readers. Otherwise, need to instruct them to do some manual changes to the styles folder also. :)

@ranelpadon
Copy link
Contributor

ranelpadon commented Dec 4, 2021

@TobiZog I'm using One Dark theme in my Alacritty terminal and Vim/Neovim/MacVim editors. I just noticed that some colors in Pygments' One Dark theme are bit off when running IPython. When I dig further, there are indeed subtle differences in some of the colors used. In the screenshot below, the top colors are the Pygments' One Dark, the bottom colors are the "expected" colors. I rearranged the tokens for easier comparison. It looks like that the Pygments' One Dark version are bit strong:

Screen Shot 2021-12-04 at 3 37 42 PM

Maybe we could follow the Vim's One Dark or Alacritty's One Dark as the "expected" values since they are quite popular and their color values are consistent with each other. Likewise, I checked with Atom's original HSL values, they are correct/consistent. Other colors in Pygments' One Dark are correct/consistent though.

Actually, I submitted also before the One Dark theme for Thonny IDE and used the same values.

Is it okay to submit a PR to refine them? Otherwise, I'll submit another variant of Pygments' One Dark theme. Ideally, there should be only 1 version, and we should align with other projects for consistency and minimize confusion to Pygments users. Thanks :)

CC: @Anteru

@Anteru
Copy link
Collaborator

Anteru commented Dec 4, 2021

@ranelpadon I'm ok with a PR but I'm afraid it's going to reduce the contrast. I guess we'll see once you submit it. We're trying to be a bit more conscious about accessibility and not have tons of new styles with bad contrast.

@ranelpadon
Copy link
Contributor

@Anteru I don't think the contrast is an issue here since it's being used in other popular open-source projects for a long time already including VS Code/PyCharm. I value consistency, the Atom's One Dark version I think should be the source of truth since they were the creator/pioneer of it. The fans of One Dark theme expect the same colors, regardless if it's high contrast or low contrast for other users/non-fans. They're fans for a reason. They love the exact values as is. Anyway, I'll submit a PR. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-theming area: changes to themes update needed Waiting for an update from the PR/issue creator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants