Revamped colour model code.