/* https://grabient.com/_gI4gI8gHvgFBgD3gEogVlgQ6gYtgL-gNjgGYgAp8sLYs?style=linearGradient&steps=21&angle=270 */
background: linear-gradient(270deg, #8172ab 0.000%, #726dae 5.000%, #666aaa 10.000%, #5e6aa0 15.000%, #5d6d91 20.000%, #61737f 25.000%, #6b7b6d 30.000%, #79845d 35.000%, #8a8e52 40.000%, #9b994e 45.000%, #aca351 50.000%, #b9ac5b 55.000%, #c2b36a 60.000%, #c5b87b 65.000%, #c2ba8e 70.000%, #bab99e 75.000%, #adb6a9 80.000%, #9db0ae 85.000%, #8ca8ac 90.000%, #7b9ea3 95.000%, #6c9495 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gI4gI8gHvgFBgD3gEogVlgQ6gYtgL-gNjgGYgAp8sLYs?style=linearGradient&steps=21&angle=270 -->
<defs>
<linearGradient id="gradient" x1="1.000" y1="0.500" x2="0.000" y2="0.500">
<stop offset="0.000" stop-color="#8172ab" /><stop offset="0.050" stop-color="#726dae" /><stop offset="0.100" stop-color="#666aaa" /><stop offset="0.150" stop-color="#5e6aa0" /><stop offset="0.200" stop-color="#5d6d91" /><stop offset="0.250" stop-color="#61737f" /><stop offset="0.300" stop-color="#6b7b6d" /><stop offset="0.350" stop-color="#79845d" /><stop offset="0.400" stop-color="#8a8e52" /><stop offset="0.450" stop-color="#9b994e" /><stop offset="0.500" stop-color="#aca351" /><stop offset="0.550" stop-color="#b9ac5b" /><stop offset="0.600" stop-color="#c2b36a" /><stop offset="0.650" stop-color="#c5b87b" /><stop offset="0.700" stop-color="#c2ba8e" /><stop offset="0.750" stop-color="#bab99e" /><stop offset="0.800" stop-color="#adb6a9" /><stop offset="0.850" stop-color="#9db0ae" /><stop offset="0.900" stop-color="#8ca8ac" /><stop offset="0.950" stop-color="#7b9ea3" /><stop offset="1.000" stop-color="#6c9495" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#8172ab", "#726dae", "#666aaa", "#5e6aa0", "#5d6d91", "#61737f", "#6b7b6d", "#79845d", "#8a8e52", "#9b994e", "#aca351", "#b9ac5b", "#c2b36a", "#c5b87b", "#c2ba8e", "#bab99e", "#adb6a9", "#9db0ae", "#8ca8ac", "#7b9ea3", "#6c9495"]
// https://grabient.com/_gI4gI8gHvgFBgD3gEogVlgQ6gYtgL-gNjgGYgAp8sLYs?style=linearGradient&steps=21&angle=270
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 21.0;
const float ANGLE = 270.0;
vec3 palette(float t) {
vec3 a = vec3(0.568, 0.572, 0.495);
vec3 b = vec3(0.204, 0.157, 0.188);
vec3 c = vec3(1.076, 0.843, 1.232);
vec3 d = vec3(0.298, 0.399, -0.060);
return a + b * cos(6.283185 * (c * t + d));
}
// N stops sampled from the palette, blended like the CSS gradient
vec3 stops(float t) {
float n = STEPS - 1.0;
float x = clamp(t, 0.0, 1.0) * n;
return mix(palette(floor(x) / n), palette(min(floor(x) + 1.0, n) / n), fract(x));
}
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.568, 0.572, 0.495],
[0.204, 0.157, 0.188],
[1.076, 0.843, 1.232],
[0.298, 0.399, -0.060]
]