ThePacielloGroup / CCAe

The Colour Contrast Analyser (CCA) helps you determine the legibility of text and the contrast of visual elements, such as graphical controls and visual indicators.
http://www.paciellogroup.com/resources/contrastanalyser/
GNU General Public License v3.0
475 stars 106 forks source link

Contrast ratio not updated for certain colour values #287

Closed patrickhlauke closed 1 year ago

patrickhlauke commented 1 year ago

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):

To Reproduce Steps to reproduce the behavior:

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 commented 1 year ago

Hi Pat, nice to see you around.

This issue has been fixed in https://github.com/ThePacielloGroup/CCAe/commit/0e9a5cb8ccd63a9b80afe8c4000b79fe2bc4c777

patrickhlauke commented 1 year ago

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

ferllings commented 1 year ago

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

patrickhlauke commented 1 year ago

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