Implement colour-setting in a hopefully nice-to-read way.
No idea whether the code works.