Which sensor should I use to detect distance, number, and colour of wire inside the conector? When the dimension of terminal is so small, around 2 mm?

Which sensor should I use to detect distance, number, and colour of wire inside the conector? When the dimension of terminal is so small, around 2 mm?