Check if the text that the user inputs is an actual HEX code by testing if it's in the HEX code **formatting**. ## Solution - [ ] Use `hexCodeFormat = /^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{6})$/;` as the variable to test the input text against - [ ] Use `.test()` to test the input text - [ ] If the input text is not in that format, show an error message of "Incorrect HEX code!" - [ ] The new if-statement show occurs after the '#' is at the front of the input text > ## Bonus ✨ > - [ ] Check if the input text is a **_valid_** HEX code, not just formatted in a way > - [ ] Try `var colorValue = parseInt(hexCode.slice(1), 16);` and `if (isNaN(colorValue) || colorValue < 0 || colorValue > 16777215){}`