Different light colors have different effects on endogenous melatonin. The preference for light colors has been studied in various animal species, except hamsters. Additionally, no research has been done on how melatonin affects color preference. In this study, I investigated whether melatonin can influence Syrian hamsters' preferences for various light colors. Eighteen female Syrian hamsters were divided into a control group and a test group orally administered 0.01 mg melatonin daily for 30 days. On Day 31, I placed each hamster in the test box at four stages: dark mid‐phase; beginning, middle, and end of day. The box had four areas with red, yellow, green, and blue lamps. In each stage, the hamsters' movements were recorded for 5 min. I tested the effects of color, stage, and melatonin treatment using a mixed model analysis. The preferences of both groups changed between the stages (p < 0.001) with the except stages 1 and 4 of the control group (p = 0.012); and stages 2 and 3 of the test group for the yellow color (p = 0.104). There was a significant difference between the test and the control groups in all stages and all colors (p < 0.001) except the green light color in stage 2 (p = 0.007). The results suggest that exogenous melatonin controls the preference for monochromatic light by an unknown mechanism. Circadian endogenous melatonin levels are also effective. Scientists must consider melatonin levels in studies evaluating responses to light.