pygments / pygments/pygments

pygments-2.17.2: Hard to read blue color on black background and gnome-terminal

Open
#2,693 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.2k
Forks
885
PR merge metrics
No merged PRs in 30d

Description

Hello,

I find really hard to read some files due to the default pygmentize style using a dark blue color for variables. I can reproduce it when gnome-terminal (3.50.1) is configured with a black background. I attach a screenshot showing the issue:
image

Sadly, few styles look to behave well with dark and light backgrounds... then, except if pygments is able to detect the used background and switch the default style, I am unsure about how to handle it.

For now, I have tested that the following styles work well with both backgrounds: igor, friendly, trac, emacs, solarized-light. Personally, I think "igor" is the best suited default for both backgrounds.

Thanks a lot

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the pygmentize entry point and review how its default style is selected. Reproduce the reported colors in gnome-terminal with black and light backgrounds, then compare the listed styles; done when a default-style decision is agreed and its readability is verified in both backgrounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, devtools
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.