automatic color detection