/* https://grabient.com/_gJqgLCgKpgFzgDngDpgUIgbIgaUgCEgJEgC_?style=linearGradient&steps=11&angle=270 */
background: linear-gradient(270deg, #dd80c3 0.000%, #97b588 10.000%, #55e973 20.000%, #40e49a 30.000%, #65abd5 40.000%, #ad7ce8 50.000%, #ec89c0 60.000%, #fac585 70.000%, #cfee74 80.000%, #85d99e 90.000%, #4b9cd8 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gJqgLCgKpgFzgDngDpgUIgbIgaUgCEgJEgC_?style=linearGradient&steps=11&angle=270 -->
<defs>
<linearGradient id="gradient" x1="1.000" y1="0.500" x2="0.000" y2="0.500">
<stop offset="0.000" stop-color="#dd80c3" /><stop offset="0.100" stop-color="#97b588" /><stop offset="0.200" stop-color="#55e973" /><stop offset="0.300" stop-color="#40e49a" /><stop offset="0.400" stop-color="#65abd5" /><stop offset="0.500" stop-color="#ad7ce8" /><stop offset="0.600" stop-color="#ec89c0" /><stop offset="0.700" stop-color="#fac585" /><stop offset="0.800" stop-color="#cfee74" /><stop offset="0.900" stop-color="#85d99e" /><stop offset="1.000" stop-color="#4b9cd8" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#dd80c3", "#97b588", "#55e973", "#40e49a", "#65abd5", "#ad7ce8", "#ec89c0", "#fac585", "#cfee74", "#85d99e", "#4b9cd8"]
// https://grabient.com/_gJqgLCgKpgFzgDngDpgUIgbIgaUgCEgJEgC_?style=linearGradient&steps=11&angle=270
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 11.0;
const float ANGLE = 270.0;
vec3 palette(float t) {
vec3 a = vec3(0.618, 0.706, 0.681);
vec3 b = vec3(0.371, 0.231, 0.233);
vec3 c = vec3(1.288, 1.736, 1.684);
vec3 d = vec3(0.132, 0.580, 0.191);
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.618, 0.706, 0.681],
[0.371, 0.231, 0.233],
[1.288, 1.736, 1.684],
[0.132, 0.580, 0.191]
]