Animals use color vision to explore their environment, recognize mates, avoid predators, and guide feeding decisions. Color vision across the tree of life relies on specialized retinal photoreceptor cells and light-sensitive opsins with different spectral sensitivities. Caenorhabditis elegans are eyeless roundworms that dwell in rotting vegetation and compost heaps, feeding on a rich diversity of microbes (1). In its natural environment, C. elegans must traverse a complex microbial terrain while determining which food is safe for consumption. Some bacteria produce colorful toxins (2), making color discrimination a potentially life-or-death decision for the worm. On page 1059 of this issue, Ghosh et al. (3) demonstrate that C. elegans, despite lacking eyes and opsin genes, can discriminate between colors to guide foraging decisions. They identify two conserved stress-response genes that are required for color discrimination, revealing a new biology of color vision.