FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-142927: Tachyon: Fix contrast ratio in top panel by hugovk · Pull Request #142936 · python/cpython · GitHub

/ cpython Public

gh-142927: Tachyon: Fix contrast ratio in top panel - #142936

Merged
pablogsal merged 3 commits into
python:mainfrom
hugovk:3.15-tachyon-contrast
Dec 25, 2025
Merged

gh-142927: Tachyon: Fix contrast ratio in top panel#142936
pablogsal merged 3 commits into
python:mainfrom
hugovk:3.15-tachyon-contrast

Conversation

hugovk commented Dec 18, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Before

In dark mode, the samples/sec numbers has contrast ratio of 2.9.

In light mode, duration and missed samples are 1.63 and 2.15 respectively.

They should be at least 4.5 to meet WCAG AA guidelines.

After

The values suggested by Chrome:

Copy link
Copy Markdown
Member

Thanks a lot @hugovk 🖤

Copy link
Copy Markdown
Member

This also affects the flamegraph output.

hugovk commented Dec 18, 2025

Copy link
Copy Markdown
Member Author

This also affects the flamegraph output.

In what way? For better, or worse? Please share more details.

Copy link
Copy Markdown
Member

As in, the CSS is copy-pasted:

.summary-card:nth-child(1) { --i: 0; --card-color: 55, 118, 171; }
.summary-card:nth-child(2) { --i: 1; --card-color: 40, 167, 69; }
.summary-card:nth-child(3) { --i: 2; --card-color: 255, 193, 7; }
.summary-card:nth-child(4) { --i: 3; --card-color: 111, 66, 193; }

hugovk commented Dec 22, 2025

Copy link
Copy Markdown
Member Author

Ah right, thanks. Let's update those too.

They should be at least 4.5 to meet WCAG AA guidelines.

Actually, that's for normal size text. The heatmap panel is large, so the original colours are at least 3.

We need 4.5 for the flamegraph, and it's hard to find colours that work for both dark and light themes. So this is now updated to different colour for dark/light and re-use via variables.

Also we don't need stat-card for 5th and 6th children, rate-card is used instead. So delete that dead code.

Heatmap:

Flamegraph:

pablogsal merged commit ea3fd78 into python:main Dec 25, 2025
44 checks passed

Copy link
Copy Markdown
Member

Thanks a lot @hugovk and @StanFromIreland !

hugovk deleted the 3.15-tachyon-contrast branch December 26, 2025 10:19
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL