test code lookup
fix bug in default colour lookup
use hash invert rather than relying on lookup time