/* https://grabient.com/_gNMgNsgMAgCYgAmgA6gMfgRLgihgCDgKKgKT?style=linearSwatches&steps=9&angle=45 */
background: linear-gradient(45deg, #f2dabc 0.000%, #f2dabc 11.111%, #dce2d1 calc(11.111% + 1px), #dce2d1 22.222%, #c4e8c7 calc(22.222% + 1px), #c4e8c7 33.333%, #b4e8b5 calc(33.333% + 1px), #b4e8b5 44.444%, #b1e2c5 calc(44.444% + 1px), #b1e2c5 55.556%, #bddad2 calc(55.556% + 1px), #bddad2 66.667%, #d2d6be calc(66.667% + 1px), #d2d6be 77.778%, #ead8b7 calc(77.778% + 1px), #ead8b7 88.889%, #fadfce calc(88.889% + 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/_gNMgNsgMAgCYgAmgA6gMfgRLgihgCDgKKgKT?style=linearSwatches&steps=9&angle=45 -->
<defs>
<clipPath id="bounds">
<rect x="0" y="0" width="800" height="400" />
</clipPath>
</defs>
<g clip-path="url(#bounds)"><path d="M 416.228,816.228 L -216.228,183.772 L -149.561,117.106 L 482.894,749.561 Z" fill="#f2dabc" fill-opacity="1.000" /><path d="M 482.894,749.561 L -149.561,117.106 L -82.894,50.439 L 549.561,682.894 Z" fill="#dce2d1" fill-opacity="1.000" /><path d="M 549.561,682.894 L -82.894,50.439 L -16.228,-16.228 L 616.228,616.228 Z" fill="#c4e8c7" fill-opacity="1.000" /><path d="M 616.228,616.228 L -16.228,-16.228 L 50.439,-82.894 L 682.894,549.561 Z" fill="#b4e8b5" fill-opacity="1.000" /><path d="M 682.894,549.561 L 50.439,-82.894 L 117.106,-149.561 L 749.561,482.894 Z" fill="#b1e2c5" fill-opacity="1.000" /><path d="M 749.561,482.894 L 117.106,-149.561 L 183.772,-216.228 L 816.228,416.228 Z" fill="#bddad2" fill-opacity="1.000" /><path d="M 816.228,416.228 L 183.772,-216.228 L 250.439,-282.894 L 882.894,349.561 Z" fill="#d2d6be" fill-opacity="1.000" /><path d="M 882.894,349.561 L 250.439,-282.894 L 317.106,-349.561 L 949.561,282.894 Z" fill="#ead8b7" fill-opacity="1.000" /><path d="M 949.561,282.894 L 317.106,-349.561 L 383.772,-416.228 L 1016.228,216.228 Z" fill="#fadfce" fill-opacity="1.000" /></g>
</svg>
["#f2dabc", "#dce2d1", "#c4e8c7", "#b4e8b5", "#b1e2c5", "#bddad2", "#d2d6be", "#ead8b7", "#fadfce"]
// https://grabient.com/_gNMgNsgMAgCYgAmgA6gMfgRLgihgCDgKKgKT?style=linearSwatches&steps=9&angle=45
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 9.0;
const float ANGLE = 45.0;
vec3 palette(float t) {
vec3 a = vec3(0.844, 0.876, 0.768);
vec3 b = vec3(0.152, 0.038, 0.058);
vec3 c = vec3(0.799, 1.099, 2.209);
vec3 d = vec3(0.131, 0.650, 0.659);
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.844, 0.876, 0.768],
[0.152, 0.038, 0.058],
[0.799, 1.099, 2.209],
[0.131, 0.650, 0.659]
]