I assume the .h2, .h3, and .h4 parts are the selectors you use on your CSS pages. If that's the case, you shouldn't use a dot before each of them as the three are HTML tags, not classes. For instance, you can use the following code to customize the text color:
.mw-parser-output h2, .mw-parser-output h3, .mw-parser-output h4, .mw-parser-output h5, .mw-parser-output h6 {
color: INSERT_COLOR_HERE;
}
EDIT: well, post lag