fixed the shade(ncolor,dir) to include indexOf(..) rather than contains(...)