/* https://grabient.com/_gKwgHEgGHgH3gIjgJCgUggW0gSigFtgKZgBq?style=linearSwatches&steps=11&angle=0 */
background: linear-gradient(0deg, #5b2cd8 0.000%, #5b2cd8 9.091%, #2fa77b calc(9.091% + 1px), #2fa77b 18.182%, #56fa12 calc(18.182% + 1px), #56fa12 27.273%, #b6e300 calc(27.273% + 1px), #b6e300 36.364%, #ff7400 calc(36.364% + 1px), #ff7400 45.455%, #ff0535 calc(45.455% + 1px), #ff0535 54.545%, #f900a0 calc(54.545% + 1px), #f900a0 63.636%, #953deb calc(63.636% + 1px), #953deb 72.727%, #41b9ee calc(72.727% + 1px), #41b9ee 81.818%, #34fea8 calc(81.818% + 1px), #34fea8 90.909%, #77d63d 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/_gKwgHEgGHgH3gIjgJCgUggW0gSigFtgKZgBq?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="#5b2cd8" 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="#2fa77b" 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="#56fa12" 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="#b6e300" 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="#ff7400" 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="#ff0535" 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="#f900a0" 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="#953deb" 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="#41b9ee" 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="#34fea8" 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="#77d63d" fill-opacity="1.000" /></g>
</svg>
["#5b2cd8", "#2fa77b", "#56fa12", "#b6e300", "#ff7400", "#ff0535", "#f900a0", "#953deb", "#41b9ee", "#34fea8", "#77d63d"]
// https://grabient.com/_gKwgHEgGHgH3gIjgJCgUggW0gSigFtgKZgBq?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.688, 0.452, 0.391);
vec3 b = vec3(0.503, 0.547, 0.578);
vec3 c = vec3(1.312, 1.460, 1.186);
vec3 d = vec3(0.365, 0.665, 0.106);
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.688, 0.452, 0.391],
[0.503, 0.547, 0.578],
[1.312, 1.460, 1.186],
[0.365, 0.665, 0.106]
]