/* https://grabient.com/_gFtgB5gIZgG2gBRgGKgGSgG9gAxg4DhcdgIz?style=linearSwatches&steps=7&angle=135 */
background: linear-gradient(135deg, #00312c 0.000%, #00312c 14.286%, #1e332e calc(14.286% + 1px), #1e332e 28.571%, #493231 calc(28.571% + 1px), #493231 42.857%, #772c33 calc(42.857% + 1px), #772c33 57.143%, #a22436 calc(57.143% + 1px), #a22436 71.429%, #c01a39 calc(71.429% + 1px), #c01a39 85.714%, #cc113c calc(85.714% + 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/_gFtgB5gIZgG2gBRgGKgGSgG9gAxg4DhcdgIz?style=linearSwatches&steps=7&angle=135 -->
<defs>
<clipPath id="bounds">
<rect x="0" y="0" width="800" height="400" />
</clipPath>
</defs>
<g clip-path="url(#bounds)"><path d="M -216.228,216.228 L 416.228,-416.228 L 501.942,-330.513 L -130.513,301.942 Z" fill="#00312c" fill-opacity="1.000" /><path d="M -130.513,301.942 L 501.942,-330.513 L 587.656,-244.799 L -44.799,387.656 Z" fill="#1e332e" fill-opacity="1.000" /><path d="M -44.799,387.656 L 587.656,-244.799 L 673.371,-159.085 L 40.915,473.371 Z" fill="#493231" fill-opacity="1.000" /><path d="M 40.915,473.371 L 673.371,-159.085 L 759.085,-73.371 L 126.629,559.085 Z" fill="#772c33" fill-opacity="1.000" /><path d="M 126.629,559.085 L 759.085,-73.371 L 844.799,12.344 L 212.344,644.799 Z" fill="#a22436" fill-opacity="1.000" /><path d="M 212.344,644.799 L 844.799,12.344 L 930.513,98.058 L 298.058,730.513 Z" fill="#c01a39" fill-opacity="1.000" /><path d="M 298.058,730.513 L 930.513,98.058 L 1016.228,183.772 L 383.772,816.228 Z" fill="#cc113c" fill-opacity="1.000" /></g>
</svg>
["#00312c", "#1e332e", "#493231", "#772c33", "#a22436", "#c01a39", "#cc113c"]
// https://grabient.com/_gFtgB5gIZgG2gBRgGKgGSgG9gAxg4DhcdgIz?style=linearSwatches&steps=7&angle=135
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 7.0;
const float ANGLE = 135.0;
vec3 palette(float t) {
vec3 a = vec3(0.365, 0.121, 0.537);
vec3 b = vec3(0.438, 0.081, 0.394);
vec3 c = vec3(0.402, 0.445, 0.049);
vec3 d = vec3(3.587, 5.917, 0.563);
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.365, 0.121, 0.537],
[0.438, 0.081, 0.394],
[0.402, 0.445, 0.049],
[3.587, 5.917, 0.563]
]