The so-called black, blue, and green "magic" tricks aren't real magic at all, they're a classic two-person code act. Here's how it's done:
You need two people who both know the secret. A spectator whispers the name of any nearby object (say, "computer") into the first person's ear. The first person then starts asking the second person about various objects, "Is it a wardrobe?" The second always says no, until the first mentions something that's black in color. The second still says no, but the very next object the first names is the one the spectator whispered, and the second says yes.
The trick is that the "signal" color, black, tells the second person that the next answer is the real one. The same works for blue magic (the cue object must be blue) and green magic (the cue object must be green).