Hard to tell from that picture, but i would suspect that your dome light has a 3-way switch (off-auto-on) and therefore on that 3 wire plug there is 1 ground wire, 1 auto(door on wire) and one always on wire. You could either use a multi-meter to figure out which is which and solder pig tails...