move colour code check before highbit stripped off