Electrical – Why is the light connected between two red wires on a circuit with two switches

electricallight-fixturelightingwiring

I'm trying to wire up a new ceiling fan that has built in lights where my old light fixture used to be but am a little confused with the wiring. In the electrical box (pic below) there are two black wires connected together and two white wires connected together. Then the old light fixture was connected between two red wires. Any idea why it was connected like that and how should I connect my new fan/light to it?

The room had two switches to control the old light, one with a dimmer on it. Is that perhaps why there is this weird wiring? Should I just wire the new fan/light up to the 2 red wires like the old light was?

enter image description here

Best Answer

It looks like a standard "power on the end, lamp in the middle" 3-way arrangement. However (for whatever reason) they chose to make the travelers black and white on both segments.

Travelers can be quite a dog's breakfast, I've seen 3-way circuits where the travelers change colors on every segment. Choosing the same colors thru makes some sense -- however white should not be one of the chosen colors. though the far, far better way is to pick a colored tape color such as yellow, and mark both travelers yellow (they are interchangeable, they can be the same color).

That's because white is special in Code rules. Colored wires (hots) cannot be remarked to be neutral. But white wires can be remarked to be a hot wire. The last guy should've made red and black the travelers and tagged white with colored tape in the segment where it served as switched-hot. That would've been reasonable.