Skip to content

Improve contrast between optional argument text and background#187

Open
dstansby wants to merge 2 commits intomatplotlib:mainfrom
dstansby:improve-text-contrast
Open

Improve contrast between optional argument text and background#187
dstansby wants to merge 2 commits intomatplotlib:mainfrom
dstansby:improve-text-contrast

Conversation

@dstansby
Copy link
Copy Markdown
Member

Fixes #138 (I think). To choose the colour I used https://webaim.org/resources/contrastchecker/ to pick the lightest colour that still passes the accessibility checks (which seem to be a contrast ratio of at least 7:1)

Comment thread cheatsheets.tex
Comment thread cheatsheets.tex


\newcommand{\optional}[1]{\textcolor{gray}{#1}}
# 89, 89, 89 is the lightest colour that still gives a good contrast ratio with the white background
Copy link
Copy Markdown
Member

@QuLogic QuLogic Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 89, 89, 89 is the lightest colour that still gives a good contrast ratio with the white background
% 89, 89, 89 is the lightest colour that still gives a good contrast ratio with the white background

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grey text of the Cheastsheets is hard to read when printed

2 participants