In the history of cryptography, 97-shiki ōbun inji-ki (九七式欧文印字機) ("System 97 Printing Machine for European Characters") or Angōki Taipu-B (暗号機 タイプB) ("Type B Cipher Machine"), codenamed Purple by the United States, was a diplomatic cryptographic machine used by the Japanese Foreign Office just before and during World War II. The machine was an electromechanical stepping-switch device.
The information gained from decryptions was eventually code-named Magic within the US government.
The codename "Purple" referred to binders used by US cryptanalysts for material produced by various systems; it replaced the Red machine used by the Japanese Foreign Office. The Japanese also used CORAL and JADE stepping-switch systems.
More information on the Wikipedia page 
See also Nomura note.