Then there was the cocktail party study, in which a group of interior designers, architects and corporate color scientists built model rooms decorated as bars in red, blue or yellow. They found that more people chose the yellow and red rooms, but that partygoers in the blue room stayed longer. Red and yellow guests were more social and active. And while red guests reported feeling hungrier and thirstier than others, yellow guests ate twice as much.

Experts say colors may affect cognitive performance because of the moods they engender.

“When you feel that the situation you are in is problematic,” said Norbert Schwarz, a psychology professor at the University of Michigan, “you are more likely to pay attention to detail, which helps you with processing tasks but interferes with creative types of things.”

By contrast, Dr. Schwarz said, “people in a happy mood are more creative and less analytic.”

Many people link red to problematic things, like emergencies or X’s on failing tests, experts say. Such “associations to red  stop, fire, alarm, warning  can be activated without a person’s awareness, and then influence what they are thinking about or doing,” said John A. Bargh, a psychology professor at Yale University. “Blue seems a weaker effect than red, but blue skies, blue water are calm and positive, and so that effect makes sense too.”

Still, Dr. Schwarz cautioned, color effects may be unreliable or inconsequential. “In some contexts red is a dangerous thing, and in some contexts red is a nice thing,” he said. “If you’re walking across a frozen river, blue is a dangerous thing.”

Indeed, Dr. Elliot of the University of Rochester said blue’s positive emotional associations were considered less consistent than red’s negative ones.

It might also matter whether the color dominates someone’s view, as on a computer screen, or is only part of what is seen. Dr. Elliot said that in the Science study, brightness or intensity of color  not just the color itself  might have had an effect.

Some previous cognitive studies found no effect from color, although some used mostly pastels or less distinctive tasks. One found that students taking tests did better on blue paper than on red, but Dr. Schwarz said the study used depressing blue and upbeat red.