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

Minimum contrast ratio isn't working for inverted text in DOM renderer #3846

Closed
Tyriar opened this issue Jun 1, 2022 · 2 comments · Fixed by #3849
Closed

Minimum contrast ratio isn't working for inverted text in DOM renderer #3846

Tyriar opened this issue Jun 1, 2022 · 2 comments · Fixed by #3849
Assignees
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jun 1, 2022

minimumContrastRatio = 4.5:

image

minimumContrastRatio = 9:

image

@meganrogge
Copy link
Member

Dom:
Screen Shot 2022-06-01 at 2 39 30 PM

Webgl:
Screen Shot 2022-06-01 at 2 39 10 PM

@meganrogge
Copy link
Member

meganrogge commented Jun 1, 2022

bgL is calculated to be 0 for DOM

const bgL = rgb.relativeLuminance(bgRgba >> 8);
const fgL = rgb.relativeLuminance(fgRgba >> 8);

Screen Shot 2022-06-01 at 2 42 09 PM

vs webgl
Screen Shot 2022-06-01 at 2 43 02 PM

meganrogge added a commit to meganrogge/xterm.js that referenced this issue Jun 2, 2022
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
meganrogge added a commit that referenced this issue Jun 2, 2022
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants