The larval color patterns in Lepidoptera exhibit splendid diversity, and identifying the genes responsible for pigment distribution is essential to understanding color-pattern evolution. The swallowtail butterfly, Papilio xuthus, is a good candidate for analyzing marking-associated genes because its body markings change dramatically at the final molt. Moreover, the silkworm Bombyx mori is most suitable for identification of lab-generated color mutants because genome information and many color mutants are available. Here, we analyzed the expression pattern of 10 melanin-related genes in P. xuthus, and analyzed whether these genes were responsible for Bombyx larval color mutants. We found that seven genes correlated strongly with the stage-specific larval cuticular markings of P. xuthus, suggesting that, compared with Drosophila, more genes showed marking specificity in lepidopteran larvae. We newly found that the expression of both tan and laccase2 is strongly correlated with the larval black markings in both P. xuthus and B. mori. The results of F2 linkage analysis and mutant analysis strongly suggest that tan is the responsible gene for Bombyx larval color mutant rouge, and that tan is important in emphasizing black markings of lepidopteran larvae. Detailed comparison of temporal and spatial expression patterns showed that larval cuticular markings were regulated at two different phases. Marking-specific expression of oxidizing enzymes preceded the marking-specific expression of melanin synthesis enzymes at mRNA level, which is the reverse of the melanin synthesis step.