/* https://grabient.com/_gGxgH0gIxgDNgDNgDKgIogItgL5gGtgGSgG1?style=linearGradient&steps=21&angle=135 */
background: linear-gradient(135deg, #3f5560 0.000%, #3c505c 5.000%, #3a4d5c 10.000%, #3a4b5e 15.000%, #3c4b63 20.000%, #3f4d6b 25.000%, #435075 30.000%, #495580 35.000%, #505a8c 40.000%, #576199 45.000%, #6069a4 50.000%, #6972af 55.000%, #727bb7 60.000%, #7b84be 65.000%, #838dc2 70.000%, #8b96c3 75.000%, #929ec0 80.000%, #98a5bc 85.000%, #9daab4 90.000%, #a0afab 95.000%, #a2b2a0 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gGxgH0gIxgDNgDNgDKgIogItgL5gGtgGSgG1?style=linearGradient&steps=21&angle=135 -->
<defs>
<linearGradient id="gradient" x1="0.146" y1="0.146" x2="0.854" y2="0.854">
<stop offset="0.000" stop-color="#3f5560" /><stop offset="0.050" stop-color="#3c505c" /><stop offset="0.100" stop-color="#3a4d5c" /><stop offset="0.150" stop-color="#3a4b5e" /><stop offset="0.200" stop-color="#3c4b63" /><stop offset="0.250" stop-color="#3f4d6b" /><stop offset="0.300" stop-color="#435075" /><stop offset="0.350" stop-color="#495580" /><stop offset="0.400" stop-color="#505a8c" /><stop offset="0.450" stop-color="#576199" /><stop offset="0.500" stop-color="#6069a4" /><stop offset="0.550" stop-color="#6972af" /><stop offset="0.600" stop-color="#727bb7" /><stop offset="0.650" stop-color="#7b84be" /><stop offset="0.700" stop-color="#838dc2" /><stop offset="0.750" stop-color="#8b96c3" /><stop offset="0.800" stop-color="#929ec0" /><stop offset="0.850" stop-color="#98a5bc" /><stop offset="0.900" stop-color="#9daab4" /><stop offset="0.950" stop-color="#a0afab" /><stop offset="1.000" stop-color="#a2b2a0" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#3f5560", "#3c505c", "#3a4d5c", "#3a4b5e", "#3c4b63", "#3f4d6b", "#435075", "#495580", "#505a8c", "#576199", "#6069a4", "#6972af", "#727bb7", "#7b84be", "#838dc2", "#8b96c3", "#929ec0", "#98a5bc", "#9daab4", "#a0afab", "#a2b2a0"]
// https://grabient.com/_gGxgH0gIxgDNgDNgDKgIogItgL5gGtgGSgG1?style=linearGradient&steps=21&angle=135
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 21.0;
const float ANGLE = 135.0;
vec3 palette(float t) {
vec3 a = vec3(0.433, 0.500, 0.561);
vec3 b = vec3(0.205, 0.205, 0.202);
vec3 c = vec3(0.552, 0.557, 0.761);
vec3 d = vec3(0.429, 0.402, 0.437);
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.433, 0.500, 0.561],
[0.205, 0.205, 0.202],
[0.552, 0.557, 0.761],
[0.429, 0.402, 0.437]
]