Evolutionary variation in the wing pigmentation of butterflies and moths offers striking examples of adaptation by crypsis and mimicry. The
cortex
locus has been independently mapped as the locus controlling color polymorphisms in 15 lepidopteran species, suggesting that it acts as a genomic hotspot for the diversification of wing patterns, but functional validation through protein-coding knockouts has proven difficult to obtain. Our study unveils the role of a long noncoding RNA (lncRNA) which we name
ivory
, transcribed from the
cortex
locus, in modulating color patterning in butterflies. Strikingly,
ivory
expression prefigures most melanic patterns during pupal development, suggesting an early developmental role in specifying scale identity. To test this, we generated CRISPR mosaic knock-outs in five nymphalid butterfly species and show that
ivory
mutagenesis yields transformations of dark pigmented scales into white or light-colored scales. Genotyping of
Vanessa cardui
germline mutants associates these phenotypes to small on-target deletions at the conserved first exon of
ivory
. In contrast,
cortex
germline mutant butterflies with confirmed null alleles lack any wing phenotype and exclude a color patterning role for this adjacent gene. Overall, these results show that a lncRNA gene acts as a master switch of color pattern specification and played key roles in the adaptive diversification of wing patterns in butterflies.