Subtract 8 from the color index (fix typo)
test whether the colour produced is a CGA integer
Refactor second argument for ease of debugging