new color logic (AGIAN)