color threashold with contoring