Light has the ability to disrupt or mask behavior that is normally controlled by the circadian clock. In mammals, masking requires melanopsin-expressing retinal ganglion cells that detect blue light and project to the thalamus. It is not known whether masking is wavelength-dependent in other vertebrates, nor is it clear what higher circuits are involved. Here, we address these questions in zebrafish. We find that diel vertical migration, a circadian behavior in larval zebrafish, is effectively masked by blue, but not by red light. Two-photon calcium imaging reveals that a retino-recipient thalamic nucleus and a downstream structure, the habenula, are tuned to blue light. Lesioning the habenula inhibits light-evoked climbing. These data suggest that a thalamo-habenula pathway may be involved in the ability of blue light to mask circadian behavior.