/* https://grabient.com/_gDagDSgD5gCXgC1gD4gdQgRhgcSgOKgIogJ5?style=linearSwatches&steps=11&angle=0 */
background: linear-gradient(0deg, #580a15 0.000%, #580a15 9.091%, #581e58 calc(9.091% + 1px), #581e58 18.182%, #303d7f calc(18.182% + 1px), #303d7f 27.273%, #12595c calc(27.273% + 1px), #12595c 36.364%, #226418 calc(36.364% + 1px), #226418 45.455%, #4d5902 calc(45.455% + 1px), #4d5902 54.545%, #5d3d33 calc(54.545% + 1px), #5d3d33 63.636%, #401e73 calc(63.636% + 1px), #401e73 72.727%, #180a77 calc(72.727% + 1px), #180a77 81.818%, #170b3b calc(81.818% + 1px), #170b3b 90.909%, #3e2004 calc(90.909% + 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/_gDagDSgD5gCXgC1gD4gdQgRhgcSgOKgIogJ5?style=linearSwatches&steps=11&angle=0 -->
<defs>
<clipPath id="bounds">
<rect x="0" y="0" width="800" height="400" />
</clipPath>
</defs>
<g clip-path="url(#bounds)"><path d="M 847.214,400.000 L -47.214,400.000 L -47.214,363.636 L 847.214,363.636 Z" fill="#580a15" fill-opacity="1.000" /><path d="M 847.214,363.636 L -47.214,363.636 L -47.214,327.273 L 847.214,327.273 Z" fill="#581e58" fill-opacity="1.000" /><path d="M 847.214,327.273 L -47.214,327.273 L -47.214,290.909 L 847.214,290.909 Z" fill="#303d7f" fill-opacity="1.000" /><path d="M 847.214,290.909 L -47.214,290.909 L -47.214,254.545 L 847.214,254.545 Z" fill="#12595c" fill-opacity="1.000" /><path d="M 847.214,254.545 L -47.214,254.545 L -47.214,218.182 L 847.214,218.182 Z" fill="#226418" fill-opacity="1.000" /><path d="M 847.214,218.182 L -47.214,218.182 L -47.214,181.818 L 847.214,181.818 Z" fill="#4d5902" fill-opacity="1.000" /><path d="M 847.214,181.818 L -47.214,181.818 L -47.214,145.455 L 847.214,145.455 Z" fill="#5d3d33" fill-opacity="1.000" /><path d="M 847.214,145.455 L -47.214,145.455 L -47.214,109.091 L 847.214,109.091 Z" fill="#401e73" fill-opacity="1.000" /><path d="M 847.214,109.091 L -47.214,109.091 L -47.214,72.727 L 847.214,72.727 Z" fill="#180a77" fill-opacity="1.000" /><path d="M 847.214,72.727 L -47.214,72.727 L -47.214,36.364 L 847.214,36.364 Z" fill="#170b3b" fill-opacity="1.000" /><path d="M 847.214,36.364 L -47.214,36.364 L -47.214,-0.000 L 847.214,0.000 Z" fill="#3e2004" fill-opacity="1.000" /></g>
</svg>
["#580a15", "#581e58", "#303d7f", "#12595c", "#226418", "#4d5902", "#5d3d33", "#401e73", "#180a77", "#170b3b", "#3e2004"]
// https://grabient.com/_gDagDSgD5gCXgC1gD4gdQgRhgcSgOKgIogJ5?style=linearSwatches&steps=11&angle=0
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 11.0;
const float ANGLE = 0.0;
vec3 palette(float t) {
vec3 a = vec3(0.218, 0.210, 0.249);
vec3 b = vec3(0.151, 0.181, 0.248);
vec3 c = vec3(1.872, 1.121, 1.810);
vec3 d = vec3(0.906, 0.552, 0.633);
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.218, 0.210, 0.249],
[0.151, 0.181, 0.248],
[1.872, 1.121, 1.810],
[0.906, 0.552, 0.633]
]