color detection logic (wip)