colorAlgorithm