/* https://grabient.com/_gJ7gPsgFwgDRgLggAKgBogDvgMFgc-gI7hSW?style=linearSwatches&steps=10&angle=15 */
background: linear-gradient(15deg, #c2575e 0.000%, #c2575e 10.000%, #c5675c calc(10.000% + 1px), #c5675c 20.000%, #c87b5b calc(20.000% + 1px), #c87b5b 30.000%, #cb925b calc(30.000% + 1px), #cb925b 40.000%, #cdad5c calc(40.000% + 1px), #cdad5c 50.000%, #cfca5d calc(50.000% + 1px), #cfca5d 60.000%, #d1e95e calc(60.000% + 1px), #d1e95e 70.000%, #d3ff60 calc(70.000% + 1px), #d3ff60 80.000%, #d4ff60 calc(80.000% + 1px), #d4ff60 90.000%, #d5ff60 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/_gJ7gPsgFwgDRgLggAKgBogDvgMFgc-gI7hSW?style=linearSwatches&steps=10&angle=15 -->
<defs>
<clipPath id="bounds">
<rect x="0" y="0" width="800" height="400" />
</clipPath>
</defs>
<g clip-path="url(#bounds)"><path d="M 755.180,602.350 L -108.770,370.855 L -93.411,313.535 L 770.539,545.029 Z" fill="#c2575e" fill-opacity="1.000" /><path d="M 770.539,545.029 L -93.411,313.535 L -78.052,256.214 L 785.898,487.709 Z" fill="#c5675c" fill-opacity="1.000" /><path d="M 785.898,487.709 L -78.052,256.214 L -62.693,198.894 L 801.257,430.388 Z" fill="#c87b5b" fill-opacity="1.000" /><path d="M 801.257,430.388 L -62.693,198.894 L -47.334,141.573 L 816.616,373.068 Z" fill="#cb925b" fill-opacity="1.000" /><path d="M 816.616,373.068 L -47.334,141.573 L -31.975,84.253 L 831.975,315.747 Z" fill="#cdad5c" fill-opacity="1.000" /><path d="M 831.975,315.747 L -31.975,84.253 L -16.616,26.932 L 847.334,258.427 Z" fill="#cfca5d" fill-opacity="1.000" /><path d="M 847.334,258.427 L -16.616,26.932 L -1.257,-30.388 L 862.693,201.106 Z" fill="#d1e95e" fill-opacity="1.000" /><path d="M 862.693,201.106 L -1.257,-30.388 L 14.102,-87.709 L 878.052,143.786 Z" fill="#d3ff60" fill-opacity="1.000" /><path d="M 878.052,143.786 L 14.102,-87.709 L 29.461,-145.029 L 893.411,86.465 Z" fill="#d4ff60" fill-opacity="1.000" /><path d="M 893.411,86.465 L 29.461,-145.029 L 44.820,-202.350 L 908.770,29.145 Z" fill="#d5ff60" fill-opacity="1.000" /></g>
</svg>
["#c2575e", "#c5675c", "#c87b5b", "#cb925b", "#cdad5c", "#cfca5d", "#d1e95e", "#d3ff60", "#d4ff60", "#d5ff60"]
// https://grabient.com/_gJ7gPsgFwgDRgLggAKgBogDvgMFgc-gI7hSW?style=linearSwatches&steps=10&angle=15
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 10.0;
const float ANGLE = 15.0;
vec3 palette(float t) {
vec3 a = vec3(0.635, 1.004, 0.368);
vec3 b = vec3(0.209, 0.736, 0.010);
vec3 c = vec3(0.104, 0.239, 0.773);
vec3 d = vec3(1.854, 0.571, 5.270);
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.635, 1.004, 0.368],
[0.209, 0.736, 0.010],
[0.104, 0.239, 0.773],
[1.854, 0.571, 5.270]
]