In a MOTOTRBO radio or repeater, there is a color code field which allows the selection of one of 15 colour codes. A radio which has been programmed with colour code 1 will not be able to transmit on a repeater configured with colour code 2 and so forth. A radio can be configured with multiple colour codes - one for each channel. A repeater can only be configured with one colour code.
Colour code is useful because it can prevent radios from one site or system mistakenly roaming to another site or system which uses the same frequencies. Although there is activity from the neighboring system, the radio will ignore all transmissions from the other system because it has a different colour code.
This is also useful for telecommunication regulators who have to allocate the same frequency to two DMR licencees in the same region. The regulator simply has to specify a colour code in the licence conditions - much like PL/DPL was used in analogue as a guard tone.
There is a limitation of course, if two geographically adjacent radio systems use the same frequencies, yet use a different colour code, there will be audio quality issues in the area where radio users are able to receive signals from both systems at roughly the same signal strength.
MOTOTRBO radios can also be configured to be "polite" to other systems using the same frequency. In the CPS, it is possible to set the TX Admit Criteria to be Color Code Free. This will only permit the radio to transmit if there is no signal, or if the signal present on the receive frequency has the same colour code.
On simplex channels which employ DCDM, colour code 15 is reserved for inter-radio synchronization signaling - so only 0 to 14 may be used on systems that use this feature.
Although not intended for this, colour code also provides an additional mechanism to prevent casual eavesdroppers. More determined (resolute) eavesdroppers will however be able to determine the colour code using a scanner and a decoder application. In such cases Enhanced Privacy or 256 bit AES should be used.