- var n = 0;

while ++n < 500
	div
View Compiled
div {
	display: inline-block;
	padding: 1em;
	background: hsl(var(--hue) var(--sat) var(--l));
	--hue: 0;
	--sat: 50%;
	--l: 50%;
}

div:nth-child(2n) { --l: 75%; }

div:nth-child(3n) { --sat: 75%; }

div:nth-child(5n) { --hue: 72; }
div:nth-child(7n) { --hue: 144; }
div:nth-child(11n) { --hue: 216; }
div:nth-child(13n) { --hue: 288; }
div:nth-child(17n) { --hue: 36; }
div:nth-child(19n) { --hue: 108; }
div:nth-child(23n) { --hue: 180; }
div:nth-child(29n) { --hue: 252; }
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.