Updated color line detector with gradient detector