I have often wondered about the logic behind color-code choices, but using the same color for L2 and PE seems dangerous.
The US standard for "line" in a single-phase system is black, with white for neutral. An electrician told that was because "black means death", which is presumably the mnemonic they taught him as an apprentice. As I understand it, the normal US code reserves white for neutral, green for ground/PE, and allows the other colors (including black) for "hot" wires (including switched).
This gets especially nasty when standards are mixed. As you point out, in regular household electric wiring, black is live, white is neutral, and green is ground. But for DC automotive use, a typical code is that black is negative/chassis, and red is positive.
RVs or camper trailers are a hybrid of a vehicle and a house. They typically have AC and DC wiring. The AC is usually like house wiring, black live and white neutral. The DC is sometimes like automotive, red + and black -, but often it's also black/white, where black is +12V and white is negative ground, connected to the chassis.
When I see a black wire in an RV, I never know whether it is connected to +12VDC, 120VAC, or chassis ground. Gotta test everything.