/* https://grabient.com/_gDBgC_gDQgC2gCkgC4gOygPMgMfgP1gKggG-?style=linearGradient&steps=7&angle=315 */
background: linear-gradient(315deg, #5f1d09 0.000%, #47460c 16.667%, #1b5b2a 33.333%, #034850 50.000%, #141f64 66.667%, #400759 83.333%, #5e1737 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gDBgC_gDQgC2gCkgC4gOygPMgMfgP1gKggG-?style=linearGradient&steps=7&angle=315 -->
<defs>
<linearGradient id="gradient" x1="0.854" y1="0.854" x2="0.146" y2="0.146">
<stop offset="0.000" stop-color="#5f1d09" /><stop offset="0.167" stop-color="#47460c" /><stop offset="0.333" stop-color="#1b5b2a" /><stop offset="0.500" stop-color="#034850" /><stop offset="0.667" stop-color="#141f64" /><stop offset="0.833" stop-color="#400759" /><stop offset="1.000" stop-color="#5e1737" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#5f1d09", "#47460c", "#1b5b2a", "#034850", "#141f64", "#400759", "#5e1737"]
// https://grabient.com/_gDBgC_gDQgC2gCkgC4gOygPMgMfgP1gKggG-?style=linearGradient&steps=7&angle=315
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 7.0;
const float ANGLE = 315.0;
vec3 palette(float t) {
vec3 a = vec3(0.193, 0.191, 0.208);
vec3 b = vec3(0.182, 0.164, 0.184);
vec3 c = vec3(0.946, 0.972, 0.799);
vec3 d = vec3(1.013, 0.672, 0.446);
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.193, 0.191, 0.208],
[0.182, 0.164, 0.184],
[0.946, 0.972, 0.799],
[1.013, 0.672, 0.446]
]