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

Contrast ratio not updated for certain colour values #287

Closed
patrickhlauke opened this issue Mar 12, 2023 · 4 comments
Closed

Contrast ratio not updated for certain colour values #287

patrickhlauke opened this issue Mar 12, 2023 · 4 comments

Comments

@patrickhlauke
Copy link
Collaborator

patrickhlauke commented Mar 12, 2023

Describe the bug
Very rarely, there are certain colour combinations that cause a JS error and don't update the contrast ratio calculation

Desktop (please complete the following information):

  • Windows 11

To Reproduce
Steps to reproduce the behavior:

  • open CCAe - by default, it will show #000 against #FFF with a ratio of 21:1
  • paste #F56E00 into the foreground colour field
  • the sample preview is correctly updated, but the contrast ratio shown remains 21:1

Expected behavior
Contrast ratio to be updated

Screenshots
Animated gif showing how pasting #F56E00 into foreground dosn't update the calculated contrast

ccae

Additional context
Following error is shown in devtools console:

C:\Program Files\CCA\Colour Contrast Analyser\resources\app.asar\src\views\js\main.js:321 Uncaught ReferenceError: t is not defined
    at applyContrastRatio (C:\Program Files\CCA\Colour Contrast Analyser\resources\app.asar\src\views\js\main.js:321:56)
    at EventEmitter.<anonymous> (C:\Program Files\CCA\Colour Contrast Analyser\resources\app.asar\src\views\js\main.js:60:5)
    at EventEmitter.emit (node:events:526:28)
    at Object.onMessage (node:electron/js2c/renderer_init:69:746)
applyContrastRatio @ C:\Program Files\CCA\Colour Contrast Analyser\resources\app.asar\src\views\js\main.js:321
(anonymous) @ C:\Program Files\CCA\Colour Contrast Analyser\resources\app.asar\src\views\js\main.js:60
emit @ node:events:526
onMessage @ node:electron/js2c/renderer_init:69
@ferllings
Copy link
Member

Hi Pat, nice to see you around.

This issue has been fixed in 0e9a5cb

@patrickhlauke
Copy link
Collaborator Author

@ferllings any chance that could be pushed to a new release then?

@ferllings
Copy link
Member

Yes, I was waiting for few things, but I postponed for too long.
I'll just need to do #284 before releasing

@patrickhlauke
Copy link
Collaborator Author

thanks for the release today @ferllings ... confirming that this is now fixed :)

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

No branches or pull requests

2 participants