/* https://grabient.com/_gNMgRqgKzgNvgNYgDKgDUgC8gHbg8NgnvgWU?style=linearGradient&steps=26&angle=45 */
background: linear-gradient(45deg, #ff4e82 0.000%, #ff5180 4.000%, #ff547e 8.000%, #ff587d 12.000%, #ff5c7d 16.000%, #ff617d 20.000%, #ff667e 24.000%, #ff6c80 28.000%, #ff7283 32.000%, #ff7986 36.000%, #ff7f8a 40.000%, #ff878f 44.000%, #ff8e94 48.000%, #ff9699 52.000%, #ff9e9e 56.000%, #ffa6a4 60.000%, #ffafaa 64.000%, #ffb8b1 68.000%, #ffc1b7 72.000%, #ffcbbd 76.000%, #ffd4c3 80.000%, #ffdec8 84.000%, #ffe8cd 88.000%, #fff2d2 92.000%, #fffcd7 96.000%, #ffffda 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gNMgRqgKzgNvgNYgDKgDUgC8gHbg8NgnvgWU?style=linearGradient&steps=26&angle=45 -->
<defs>
<linearGradient id="gradient" x1="0.146" y1="0.854" x2="0.854" y2="0.146">
<stop offset="0.000" stop-color="#ff4e82" /><stop offset="0.040" stop-color="#ff5180" /><stop offset="0.080" stop-color="#ff547e" /><stop offset="0.120" stop-color="#ff587d" /><stop offset="0.160" stop-color="#ff5c7d" /><stop offset="0.200" stop-color="#ff617d" /><stop offset="0.240" stop-color="#ff667e" /><stop offset="0.280" stop-color="#ff6c80" /><stop offset="0.320" stop-color="#ff7283" /><stop offset="0.360" stop-color="#ff7986" /><stop offset="0.400" stop-color="#ff7f8a" /><stop offset="0.440" stop-color="#ff878f" /><stop offset="0.480" stop-color="#ff8e94" /><stop offset="0.520" stop-color="#ff9699" /><stop offset="0.560" stop-color="#ff9e9e" /><stop offset="0.600" stop-color="#ffa6a4" /><stop offset="0.640" stop-color="#ffafaa" /><stop offset="0.680" stop-color="#ffb8b1" /><stop offset="0.720" stop-color="#ffc1b7" /><stop offset="0.760" stop-color="#ffcbbd" /><stop offset="0.800" stop-color="#ffd4c3" /><stop offset="0.840" stop-color="#ffdec8" /><stop offset="0.880" stop-color="#ffe8cd" /><stop offset="0.920" stop-color="#fff2d2" /><stop offset="0.960" stop-color="#fffcd7" /><stop offset="1.000" stop-color="#ffffda" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#ff4e82", "#ff5180", "#ff547e", "#ff587d", "#ff5c7d", "#ff617d", "#ff667e", "#ff6c80", "#ff7283", "#ff7986", "#ff7f8a", "#ff878f", "#ff8e94", "#ff9699", "#ff9e9e", "#ffa6a4", "#ffafaa", "#ffb8b1", "#ffc1b7", "#ffcbbd", "#ffd4c3", "#ffdec8", "#ffe8cd", "#fff2d2", "#fffcd7", "#ffffda"]
// https://grabient.com/_gNMgRqgKzgNvgNYgDKgDUgC8gHbg8NgnvgWU?style=linearGradient&steps=26&angle=45
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 26.0;
const float ANGLE = 45.0;
vec3 palette(float t) {
vec3 a = vec3(0.844, 1.130, 0.691);
vec3 b = vec3(0.879, 0.856, 0.202);
vec3 c = vec3(0.212, 0.188, 0.475);
vec3 d = vec3(3.853, 2.543, 1.428);
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.844, 1.130, 0.691],
[0.879, 0.856, 0.202],
[0.212, 0.188, 0.475],
[3.853, 2.543, 1.428]
]