/* https://grabient.com/_gG0gHogI-gBagBPgH3gApgPJgAJhenhE1gAL?style=linearSwatches&steps=10&angle=315 */
background: linear-gradient(315deg, #856cff 0.000%, #856cff 10.000%, #8568ff calc(10.000% + 1px), #8568ff 20.000%, #846eff calc(20.000% + 1px), #846eff 30.000%, #847aff calc(30.000% + 1px), #847aff 40.000%, #8487ff calc(40.000% + 1px), #8487ff 50.000%, #838fff calc(50.000% + 1px), #838fff 60.000%, #8390ff calc(60.000% + 1px), #8390ff 70.000%, #8387ff calc(70.000% + 1px), #8387ff 80.000%, #827aff calc(80.000% + 1px), #827aff 90.000%, #826eff 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/_gG0gHogI-gBagBPgH3gApgPJgAJhenhE1gAL?style=linearSwatches&steps=10&angle=315 -->
<defs>
<clipPath id="bounds">
<rect x="0" y="0" width="800" height="400" />
</clipPath>
</defs>
<g clip-path="url(#bounds)"><path d="M 1016.228,183.772 L 383.772,816.228 L 323.772,756.228 L 956.228,123.772 Z" fill="#856cff" fill-opacity="1.000" /><path d="M 956.228,123.772 L 323.772,756.228 L 263.772,696.228 L 896.228,63.772 Z" fill="#8568ff" fill-opacity="1.000" /><path d="M 896.228,63.772 L 263.772,696.228 L 203.772,636.228 L 836.228,3.772 Z" fill="#846eff" fill-opacity="1.000" /><path d="M 836.228,3.772 L 203.772,636.228 L 143.772,576.228 L 776.228,-56.228 Z" fill="#847aff" fill-opacity="1.000" /><path d="M 776.228,-56.228 L 143.772,576.228 L 83.772,516.228 L 716.228,-116.228 Z" fill="#8487ff" fill-opacity="1.000" /><path d="M 716.228,-116.228 L 83.772,516.228 L 23.772,456.228 L 656.228,-176.228 Z" fill="#838fff" fill-opacity="1.000" /><path d="M 656.228,-176.228 L 23.772,456.228 L -36.228,396.228 L 596.228,-236.228 Z" fill="#8390ff" fill-opacity="1.000" /><path d="M 596.228,-236.228 L -36.228,396.228 L -96.228,336.228 L 536.228,-296.228 Z" fill="#8387ff" fill-opacity="1.000" /><path d="M 536.228,-296.228 L -96.228,336.228 L -156.228,276.228 L 476.228,-356.228 Z" fill="#827aff" fill-opacity="1.000" /><path d="M 476.228,-356.228 L -156.228,276.228 L -216.228,216.228 L 416.228,-416.228 Z" fill="#826eff" fill-opacity="1.000" /></g>
</svg>
["#856cff", "#8568ff", "#846eff", "#847aff", "#8487ff", "#838fff", "#8390ff", "#8387ff", "#827aff", "#826eff"]
// https://grabient.com/_gG0gHogI-gBagBPgH3gApgPJgAJhenhE1gAL?style=linearSwatches&steps=10&angle=315
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 10.0;
const float ANGLE = 315.0;
vec3 palette(float t) {
vec3 a = vec3(0.436, 0.488, 0.574);
vec3 b = vec3(0.090, 0.079, 0.503);
vec3 c = vec3(0.041, 0.969, 0.009);
vec3 d = vec3(6.055, 4.405, 0.011);
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.436, 0.488, 0.574],
[0.090, 0.079, 0.503],
[0.041, 0.969, 0.009],
[6.055, 4.405, 0.011]
]