/* https://grabient.com/_gB5gIZgBcgBRgGKgOKgG9gAxgFuhcsgJCg4S?style=linearSwatches&steps=10&angle=135 */
background: linear-gradient(135deg, #323000 0.000%, #323000 10.000%, #333200 calc(10.000% + 1px), #333200 20.000%, #333400 calc(20.000% + 1px), #333400 30.000%, #313600 calc(30.000% + 1px), #313600 40.000%, #2d382d calc(40.000% + 1px), #2d382d 50.000%, #283a66 calc(50.000% + 1px), #283a66 60.000%, #223c9b calc(60.000% + 1px), #223c9b 70.000%, #1b3ec6 calc(70.000% + 1px), #1b3ec6 80.000%, #1540e7 calc(80.000% + 1px), #1540e7 90.000%, #1043fa 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/_gB5gIZgBcgBRgGKgOKgG9gAxgFuhcsgJCg4S?style=linearSwatches&steps=10&angle=135 -->
<defs>
<clipPath id="bounds">
<rect x="0" y="0" width="800" height="400" />
</clipPath>
</defs>
<g clip-path="url(#bounds)"><path d="M -216.228,216.228 L 416.228,-416.228 L 476.228,-356.228 L -156.228,276.228 Z" fill="#323000" fill-opacity="1.000" /><path d="M -156.228,276.228 L 476.228,-356.228 L 536.228,-296.228 L -96.228,336.228 Z" fill="#333200" fill-opacity="1.000" /><path d="M -96.228,336.228 L 536.228,-296.228 L 596.228,-236.228 L -36.228,396.228 Z" fill="#333400" fill-opacity="1.000" /><path d="M -36.228,396.228 L 596.228,-236.228 L 656.228,-176.228 L 23.772,456.228 Z" fill="#313600" fill-opacity="1.000" /><path d="M 23.772,456.228 L 656.228,-176.228 L 716.228,-116.228 L 83.772,516.228 Z" fill="#2d382d" fill-opacity="1.000" /><path d="M 83.772,516.228 L 716.228,-116.228 L 776.228,-56.228 L 143.772,576.228 Z" fill="#283a66" fill-opacity="1.000" /><path d="M 143.772,576.228 L 776.228,-56.228 L 836.228,3.772 L 203.772,636.228 Z" fill="#223c9b" fill-opacity="1.000" /><path d="M 203.772,636.228 L 836.228,3.772 L 896.228,63.772 L 263.772,696.228 Z" fill="#1b3ec6" fill-opacity="1.000" /><path d="M 263.772,696.228 L 896.228,63.772 L 956.228,123.772 L 323.772,756.228 Z" fill="#1540e7" fill-opacity="1.000" /><path d="M 323.772,756.228 L 956.228,123.772 L 1016.228,183.772 L 383.772,816.228 Z" fill="#1043fa" fill-opacity="1.000" /></g>
</svg>
["#323000", "#333200", "#333400", "#313600", "#2d382d", "#283a66", "#223c9b", "#1b3ec6", "#1540e7", "#1043fa"]
// https://grabient.com/_gB5gIZgBcgBRgGKgOKgG9gAxgFuhcsgJCg4S?style=linearSwatches&steps=10&angle=135
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 10.0;
const float ANGLE = 135.0;
vec3 palette(float t) {
vec3 a = vec3(0.121, 0.537, 0.092);
vec3 b = vec3(0.081, 0.394, 0.906);
vec3 c = vec3(0.445, 0.049, 0.366);
vec3 d = vec3(5.932, 0.578, 3.602);
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.121, 0.537, 0.092],
[0.081, 0.394, 0.906],
[0.445, 0.049, 0.366],
[5.932, 0.578, 3.602]
]