Data is connected to the internet with a sensor for understanding the property of the thing for which a two-dimensional code was used. Two-dimensional codes can play the role of connecting cyberspace to physical space, and can play a significant role in the so-called Internet of Things. Moreover, the advancement of machine vision is progressing with machine-to-machine communication. On the other hand, there is also private information, such as personal information, that should not be known by others. Current two-dimensional codes have become ubiquitous and express the cell using two colors: white and black. The cell expresses white or black in one bit, and there is no confidentiality available. In response to this, we propose an addition to the existing part that can be read with conventional equipment. We propose a 'secrecy part' that cannot be read without a decryption key. Further, we propose a method for rendering these two-dimensional codes compatible with black-and-white codes. In order to generate the secrecy part, it is necessary to transform a cell into several bits. A multicolor method and a multiple-region method are used to transform the code into several bits. An evaluation of the multi-valued cells in the two-dimensional codes here proposed, with a read verification and compatibility along with the added secrecy part, was carried out using a smartphone with successful results.