Recovered old colour adjustment code (with comments)