@function get-rainbow($n: 12, $sat: 90%, $lum: 65%) {
	$unit: 360/$n;
	$s-list: ();
	
	@for $i from 0 through $n {
		$s-list: $s-list, hsl($i*$unit, $sat, $lum)
	}
	
	@return $s-list
}

html {
	background: linear-gradient(90deg, get-rainbow())
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.