In Europe, where this color-coding scheme started, they use BROWN for the high side (220v AC), blue for the low side (or neutral), and green w/ a yellow stripe for Earth ground. For control circuitry, sensors, etc. The BROWN wire is the +V (anywhere from +5v to +30V), BLUE is the low side (reference ground), BLACK is the output (signal), either an active HIGH (PNP) or an active LOW (NPN). Some sensors have an additional wire, WHITE, which is the complement of the signal output, either NPN or PNP. And, some sensors (mostly amplifiers used w/ fibre optics) have additional wires, TAN & PINK, which are defined as "TEACH" and/or remote trigger (input control). About the only recognized universal standard is the three-wire sensor, where BROWN is the +V, BLUE is the reference ground lead, and BLACK is the signal output.
BANNER ENGINEERING light sensors, for example, include both PNP & NPN outputs, and their cables, whether utilized w/ sepatate M8 or M12 connectors OR self-contained, are packed w/ a BROWN lead, a BLUE lead, a BLACK lead, and a WHITE lead. The BLACK lead is the PNP output, the WHITE lead is the NPN output for the ACTIVE state. These devices are configured to be either DARK-ON or LIGHT-ON, but in each case, they are separately identified catalog items.