Here's the relevant HTML code:
<input type="text" id="color" name="color" value="#123456" ng-model="color" ng-change="return hexToRGB(document.getElementById('color').value);"/>
ng-change seems to be the root of the issue. Is there something I need to change here? Or is there something else that needs to be fixed?