/* https://grabient.com/_gImgGMgJMgMJgBYgCQgDwgMagCGg_Fgr2hK9?style=linearSwatches&steps=10&angle=30 */
background: linear-gradient(30deg, #ff6da1 0.000%, #ff6da1 10.000%, #ff77a4 calc(10.000% + 1px), #ff77a4 20.000%, #ff7ba7 calc(20.000% + 1px), #ff7ba7 30.000%, #ff79aa calc(30.000% + 1px), #ff79aa 40.000%, #ff71ad calc(40.000% + 1px), #ff71ad 50.000%, #eb65af calc(50.000% + 1px), #eb65af 60.000%, #cd5ab2 calc(60.000% + 1px), #cd5ab2 70.000%, #ad51b4 calc(70.000% + 1px), #ad51b4 80.000%, #8c4fb6 calc(80.000% + 1px), #8c4fb6 90.000%, #6b53b7 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/_gImgGMgJMgMJgBYgCQgDwgMagCGg_Fgr2hK9?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="#ff6da1" 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="#ff77a4" 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="#ff7ba7" 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="#ff79aa" 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="#ff71ad" 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="#eb65af" 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="#cd5ab2" 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="#ad51b4" 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="#8c4fb6" 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="#6b53b7" fill-opacity="1.000" /></g>
</svg>
["#ff6da1", "#ff77a4", "#ff7ba7", "#ff79aa", "#ff71ad", "#eb65af", "#cd5ab2", "#ad51b4", "#8c4fb6", "#6b53b7"]
// https://grabient.com/_gImgGMgJMgMJgBYgCQgDwgMagCGg_Fgr2hK9?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.550, 0.396, 0.588);
vec3 b = vec3(0.777, 0.088, 0.144);
vec3 c = vec3(0.240, 0.794, 0.134);
vec3 d = vec3(4.037, 2.806, 4.797);
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.550, 0.396, 0.588],
[0.777, 0.088, 0.144],
[0.240, 0.794, 0.134],
[4.037, 2.806, 4.797]
]