1. A method for determining optimum color gradation levels used by a color gradation barcode in a closed loop system including a rendering device for rendering the barcode and a detector for detecting the barcode, the method comprising: (a) obtaining input color gradation data; (b) rendering, by using the rendering device, a test pattern based on the input color gradation data, the test pattern comprising at least one color gradation pattern containing a first plurality of color gradation levels; (c) detecting, by using the detector, the rendered test pattern to generate detected color gradation data; (d) based on comparison of an input to the closed loop system which is the input color gradation data for the test pattern and an output of the closed loop system which is the detected color gradation data from the same test pattern, selecting a second plurality of color gradation levels from the first plurality of color gradation levels to be used for producing a color gradation barcode, where the number of the second plurality of color gradation levels is fewer than the number of the first plurality of color gradation levels; and (e) storing the second plurality of color gradation levels.