To add to what
Cartageno said, the paintings tell you the colors of the dresses/gowns/lingerie they are wearing, which represent one of the colors of the seven deadly sins. For instance, "A paining of a young woman in an
orange dress. She is surrounded by pastries and cakes." The cakes and pastries represent gluttony and the color for that sin is orange. Gluttony is the first book of sin volume. So if your color code starts with orange, the first number to the passcode is 1. "A painting of a woman wearing a
red feathered cloak. She is surrounded by flames and looks quite intimidating". The color red represents wrath which is the sixth book of sin, so if your code has the color red in it, then that number will be 6.
I've also explained it in more detail
here if you're still stuck.