/* https://grabient.com/_gIVgI2gPKgEpgHvgMVgAcgBvgFQg37gQXhH8?style=linearSwatches&steps=10&angle=120 */
background: linear-gradient(120deg, #45ff58 0.000%, #45ff58 10.000%, #46ff78 calc(10.000% + 1px), #46ff78 20.000%, #47ffa0 calc(20.000% + 1px), #47ffa0 30.000%, #48fdcd calc(30.000% + 1px), #48fdcd 40.000%, #48f8fc calc(40.000% + 1px), #48f8fc 50.000%, #49f2ff calc(50.000% + 1px), #49f2ff 60.000%, #4aecff calc(60.000% + 1px), #4aecff 70.000%, #4be5ff calc(70.000% + 1px), #4be5ff 80.000%, #4cddff calc(80.000% + 1px), #4cddff 90.000%, #4dd5ff calc(90.000% + 1px) 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gIVgI2gPKgEpgHvgMVgAcgBvgFQg37gQXhH8?style=linearSwatches&steps=10&angle=120 -->
<defs>
<clipPath id="bounds">
<rect x="0" y="0" width="800" height="400" />
</clipPath>
</defs>
<g clip-path="url(#bounds)"><path d="M -210.209,364.093 L 237.004,-410.503 L 314.325,-365.862 L -132.889,408.734 Z" fill="#45ff58" fill-opacity="1.000" /><path d="M -132.889,408.734 L 314.325,-365.862 L 391.645,-321.221 L -55.568,453.375 Z" fill="#46ff78" fill-opacity="1.000" /><path d="M -55.568,453.375 L 391.645,-321.221 L 468.966,-276.580 L 21.752,498.016 Z" fill="#47ffa0" fill-opacity="1.000" /><path d="M 21.752,498.016 L 468.966,-276.580 L 546.286,-231.939 L 99.073,542.657 Z" fill="#48fdcd" fill-opacity="1.000" /><path d="M 99.073,542.657 L 546.286,-231.939 L 623.607,-187.298 L 176.393,587.298 Z" fill="#48f8fc" fill-opacity="1.000" /><path d="M 176.393,587.298 L 623.607,-187.298 L 700.927,-142.657 L 253.714,631.939 Z" fill="#49f2ff" fill-opacity="1.000" /><path d="M 253.714,631.939 L 700.927,-142.657 L 778.248,-98.016 L 331.034,676.580 Z" fill="#4aecff" fill-opacity="1.000" /><path d="M 331.034,676.580 L 778.248,-98.016 L 855.568,-53.375 L 408.355,721.221 Z" fill="#4be5ff" fill-opacity="1.000" /><path d="M 408.355,721.221 L 855.568,-53.375 L 932.889,-8.734 L 485.675,765.862 Z" fill="#4cddff" fill-opacity="1.000" /><path d="M 485.675,765.862 L 932.889,-8.734 L 1010.209,35.907 L 562.996,810.503 Z" fill="#4dd5ff" fill-opacity="1.000" /></g>
</svg>
["#45ff58", "#46ff78", "#47ffa0", "#48fdcd", "#48f8fc", "#49f2ff", "#4aecff", "#4be5ff", "#4cddff", "#4dd5ff"]
// https://grabient.com/_gIVgI2gPKgEpgHvgMVgAcgBvgFQg37gQXhH8?style=linearSwatches&steps=10&angle=120
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 10.0;
const float ANGLE = 120.0;
vec3 palette(float t) {
vec3 a = vec3(0.533, 0.566, 0.970);
vec3 b = vec3(0.297, 0.495, 0.789);
vec3 c = vec3(0.028, 0.111, 0.336);
vec3 d = vec3(3.579, 1.047, 4.604);
return a + b * cos(6.283185 * (c * t + d));
}
// N hard swatches sampled from the palette
vec3 stops(float t) {
float i = min(floor(clamp(t, 0.0, 1.0) * STEPS), STEPS - 1.0);
return palette(i / (STEPS - 1.0));
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 p = fragCoord - 0.5 * iResolution.xy;
// CSS angle: 0 = up, clockwise; span = CSS gradient-line length
vec2 dir = vec2(sin(radians(ANGLE)), cos(radians(ANGLE)));
float len = abs(iResolution.x * dir.x) + abs(iResolution.y * dir.y);
float t = dot(p, dir) / len + 0.5;
fragColor = vec4(stops(t), 1.0);
}
[
[0.533, 0.566, 0.970],
[0.297, 0.495, 0.789],
[0.028, 0.111, 0.336],
[3.579, 1.047, 4.604]
]