2006 Scion XB - headlight issue

Be sure to check the connections for continuity also.
And I’d suggest checking the circuitry without regard to the wire colors. It is possible that the connector is of a “generic” design, and wiring colors may not be consistent. The idea is a “wild card” idea, but when there’s a problem with an installation it’s wise to not make any assumptions.