In one sense, the only room color relevant to the plot of the story is the black room with the red window. In most Western cultures, black, partly because it represents night when humans are most vulnerable, is the color of death and dying, sadness, evil, fear, unhappiness, and anger. If someone says, for example, "I'm in a really black mood," you do not want to be near that person. In the context of "The Masque of the Red Death," the fact that the window is red is especially ominous because red often symbolizes blood, so the combination of a black room with a window that transforms all light into a red glow carries nothing but negative connotations.
For the other rooms, the colors are less meaningful to the story but add to the overall Gothic effect: blue is often associated with life because it is the color of water; purple, royalty and wisdom; green, nature, youth, but also jealousy ("the green-eyed monster"); orange, energy and enthusiasm;white, purity, spirituality; violet, beauty and passion.
Poe tells us that the layout of the main hall is very different from a typical castle's large, open hall. Instead, the Duke, to suit his "bizarre" tastes, has divided the area into smaller rooms with a
sharp turn at every twenty or thirty yards, and at each turn a novel effect. To the right and left, in the middle of each wall, a tall and narrow Gothic window looked out upon a closed corridor which pursued the windings of the suite.
We don't know exactly whether these rooms create an overall pattern, but what is important is that they seem to be designed to keep people in rather than out, as in "trapped," and the rooms add to the overall Gotic effect of the castle's interior, particularly because they are not well lit, and the colored windows enhance the surrealistic atmosphere.
An important element in the plot is that the Red Death makes its way through all the rooms, thereby infecting all the revelers in each room, and ends his walk in the black room with the red window, the Red Death's symbolic home because the room itself mirrors the effects of the disease. In fact there is no other room in which he could have logically ended his visit to the Prince's castle.