/* https://grabient.com/_gHngEwgEdgGbgOWgE9gB1gCWgANhd-haCgu3?style=linearSwatches&steps=10&angle=150 */
background: linear-gradient(150deg, #e55f9a 0.000%, #e55f9a 10.000%, #e3779a calc(10.000% + 1px), #e3779a 20.000%, #e28f9a calc(20.000% + 1px), #e28f9a 30.000%, #dfa699 calc(30.000% + 1px), #dfa699 40.000%, #dcbd99 calc(40.000% + 1px), #dcbd99 50.000%, #d8d299 calc(50.000% + 1px), #d8d299 60.000%, #d4e599 calc(60.000% + 1px), #d4e599 70.000%, #cff799 calc(70.000% + 1px), #cff799 80.000%, #c9ff99 calc(80.000% + 1px), #c9ff99 90.000%, #c3ff99 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/_gHngEwgEdgGbgOWgE9gB1gCWgANhd-haCgu3?style=linearSwatches&steps=10&angle=150 -->
<defs>
<clipPath id="bounds">
<rect x="0" y="0" width="800" height="400" />
</clipPath>
</defs>
<g clip-path="url(#bounds)"><path d="M -173.901,100.402 L 600.696,-346.812 L 638.016,-282.171 L -136.580,165.043 Z" fill="#e55f9a" fill-opacity="1.000" /><path d="M -136.580,165.043 L 638.016,-282.171 L 675.337,-217.530 L -99.260,229.684 Z" fill="#e3779a" fill-opacity="1.000" /><path d="M -99.260,229.684 L 675.337,-217.530 L 712.657,-152.889 L -61.939,294.325 Z" fill="#e28f9a" fill-opacity="1.000" /><path d="M -61.939,294.325 L 712.657,-152.889 L 749.978,-88.248 L -24.619,358.966 Z" fill="#dfa699" fill-opacity="1.000" /><path d="M -24.619,358.966 L 749.978,-88.248 L 787.298,-23.607 L 12.702,423.607 Z" fill="#dcbd99" fill-opacity="1.000" /><path d="M 12.702,423.607 L 787.298,-23.607 L 824.619,41.034 L 50.022,488.248 Z" fill="#d8d299" fill-opacity="1.000" /><path d="M 50.022,488.248 L 824.619,41.034 L 861.939,105.675 L 87.343,552.889 Z" fill="#d4e599" fill-opacity="1.000" /><path d="M 87.343,552.889 L 861.939,105.675 L 899.260,170.316 L 124.663,617.530 Z" fill="#cff799" fill-opacity="1.000" /><path d="M 124.663,617.530 L 899.260,170.316 L 936.580,234.957 L 161.984,682.171 Z" fill="#c9ff99" fill-opacity="1.000" /><path d="M 161.984,682.171 L 936.580,234.957 L 973.901,299.598 L 199.304,746.812 Z" fill="#c3ff99" fill-opacity="1.000" /></g>
</svg>
["#e55f9a", "#e3779a", "#e28f9a", "#dfa699", "#dcbd99", "#d8d299", "#d4e599", "#cff799", "#c9ff99", "#c3ff99"]
// https://grabient.com/_gHngEwgEdgGbgOWgE9gB1gCWgANhd-haCgu3?style=linearSwatches&steps=10&angle=150
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 10.0;
const float ANGLE = 150.0;
vec3 palette(float t) {
vec3 a = vec3(0.487, 0.304, 0.285);
vec3 b = vec3(0.411, 0.918, 0.317);
vec3 c = vec3(0.117, 0.150, 0.013);
vec3 d = vec3(6.014, 5.762, 2.999);
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.487, 0.304, 0.285],
[0.411, 0.918, 0.317],
[0.117, 0.150, 0.013],
[6.014, 5.762, 2.999]
]