Refactor colour plugin