colour algorithms