/* https://grabient.com/_gPdgDbgIVgLegDFgOUgBFgAygBcg2rgnRhI7?style=linearGradient&steps=10&angle=255 */
background: linear-gradient(255deg, #410614 0.000%, #410621 11.111%, #42062e 22.222%, #43063c 33.333%, #44074b 44.444%, #460759 55.556%, #480868 66.667%, #4b0877 77.778%, #4e0986 88.889%, #520995 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gPdgDbgIVgLegDFgOUgBFgAygBcg2rgnRhI7?style=linearGradient&steps=10&angle=255 -->
<defs>
<linearGradient id="gradient" x1="0.983" y1="0.371" x2="0.017" y2="0.629">
<stop offset="0.000" stop-color="#410614" /><stop offset="0.111" stop-color="#410621" /><stop offset="0.222" stop-color="#42062e" /><stop offset="0.333" stop-color="#43063c" /><stop offset="0.444" stop-color="#44074b" /><stop offset="0.556" stop-color="#460759" /><stop offset="0.667" stop-color="#480868" /><stop offset="0.778" stop-color="#4b0877" /><stop offset="0.889" stop-color="#4e0986" /><stop offset="1.000" stop-color="#520995" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#410614", "#410621", "#42062e", "#43063c", "#44074b", "#460759", "#480868", "#4b0877", "#4e0986", "#520995"]
// https://grabient.com/_gPdgDbgIVgLegDFgOUgBFgAygBcg2rgnRhI7?style=linearGradient&steps=10&angle=255
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 10.0;
const float ANGLE = 255.0;
vec3 palette(float t) {
vec3 a = vec3(0.989, 0.219, 0.533);
vec3 b = vec3(0.734, 0.197, 0.916);
vec3 c = vec3(0.069, 0.050, 0.092);
vec3 d = vec3(3.499, 2.513, 4.667);
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.989, 0.219, 0.533],
[0.734, 0.197, 0.916],
[0.069, 0.050, 0.092],
[3.499, 2.513, 4.667]
]