updated scan detector to work with color

I made the maximum color length for some color like blueviolet