/* https://grabient.com/_gHsgDMgF6gCegD1gCYgIKgJlgFyha_hAqgXT?style=linearSwatches&steps=10&angle=30 */
background: linear-gradient(30deg, #8f5c3a 0.000%, #8f5c3a 10.000%, #9b453a calc(10.000% + 1px), #9b453a 20.000%, #a32b3e calc(20.000% + 1px), #a32b3e 30.000%, #a61243 calc(30.000% + 1px), #a61243 40.000%, #a3004b calc(40.000% + 1px), #a3004b 50.000%, #9c0054 calc(50.000% + 1px), #9c0054 60.000%, #91005d calc(60.000% + 1px), #91005d 70.000%, #830567 calc(70.000% + 1px), #830567 80.000%, #741a71 calc(80.000% + 1px), #741a71 90.000%, #673479 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/_gHsgDMgF6gCegD1gCYgIKgJlgFyha_hAqgXT?style=linearSwatches&steps=10&angle=30 -->
<defs>
<clipPath id="bounds">
<rect x="0" y="0" width="800" height="400" />
</clipPath>
</defs>
<g clip-path="url(#bounds)"><path d="M 600.696,746.812 L -173.901,299.598 L -136.580,234.957 L 638.016,682.171 Z" fill="#8f5c3a" fill-opacity="1.000" /><path d="M 638.016,682.171 L -136.580,234.957 L -99.260,170.316 L 675.337,617.530 Z" fill="#9b453a" fill-opacity="1.000" /><path d="M 675.337,617.530 L -99.260,170.316 L -61.939,105.675 L 712.657,552.889 Z" fill="#a32b3e" fill-opacity="1.000" /><path d="M 712.657,552.889 L -61.939,105.675 L -24.619,41.034 L 749.978,488.248 Z" fill="#a61243" fill-opacity="1.000" /><path d="M 749.978,488.248 L -24.619,41.034 L 12.702,-23.607 L 787.298,423.607 Z" fill="#a3004b" fill-opacity="1.000" /><path d="M 787.298,423.607 L 12.702,-23.607 L 50.022,-88.248 L 824.619,358.966 Z" fill="#9c0054" fill-opacity="1.000" /><path d="M 824.619,358.966 L 50.022,-88.248 L 87.343,-152.889 L 861.939,294.325 Z" fill="#91005d" fill-opacity="1.000" /><path d="M 861.939,294.325 L 87.343,-152.889 L 124.663,-217.530 L 899.260,229.684 Z" fill="#830567" fill-opacity="1.000" /><path d="M 899.260,229.684 L 124.663,-217.530 L 161.984,-282.171 L 936.580,165.043 Z" fill="#741a71" fill-opacity="1.000" /><path d="M 936.580,165.043 L 161.984,-282.171 L 199.304,-346.812 L 973.901,100.402 Z" fill="#673479" fill-opacity="1.000" /></g>
</svg>
["#8f5c3a", "#9b453a", "#a32b3e", "#a61243", "#a3004b", "#9c0054", "#91005d", "#830567", "#741a71", "#673479"]
// https://grabient.com/_gHsgDMgF6gCegD1gCYgIKgJlgFyha_hAqgXT?style=linearSwatches&steps=10&angle=30
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 10.0;
const float ANGLE = 30.0;
vec3 palette(float t) {
vec3 a = vec3(0.492, 0.204, 0.378);
vec3 b = vec3(0.158, 0.245, 0.152);
vec3 c = vec3(0.522, 0.613, 0.370);
vec3 d = vec3(5.823, 4.138, 1.491);
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.492, 0.204, 0.378],
[0.158, 0.245, 0.152],
[0.522, 0.613, 0.370],
[5.823, 4.138, 1.491]
]