<div>
<p class="foo"></p>
<p class="foo"></p>
<p class="bar"></p>
<p class="bar bar--yellow"></p>
<p class="bar bar--yellow"></p>
<p class="bar"></p>
</div>
.bar--yellow {
color: yellow;
}
.bar:nth-child(4),
.bar:nth-child(5) {
color: yellow;
}