Why not work code (background-check.js)?

Tell me, please, what am I doing wrong? The text color needs to change depending on the background color. https://codepen.io/onymelo/pen/OpYeMo
June 27th 19 at 15:31

Find more questions by tags CSSHTMLJavaScript