Dumb PCV question

This is probably common knowledge here, but what is the deal with the PCV cap over the PCV valve. Before I broke down my engine, it only had the metal threaded PCV valve. No cap. It most have been lost before I got the car. I would like to find an OE cap, but I am wondering what the cap is for. Is is just for looks?

The picture is not mine. Is is supposed to be black or engine color?

View attachment 362260
Author: Cazman