dynamic colors
check for nearest intersection