Fixed the colour display bug, as well as tidying the code up in order to better comply with PEP8.