/* https://grabient.com/_gJLgMOgN5gC4gB7gBNgOrgQrgX0gNdgNugEh?style=linearGradient&steps=9&angle=315 */
background: linear-gradient(315deg, #b4dede 0.000%, #c4e7cf 12.500%, #bcdbd9 25.000%, #a0c2ef 37.500%, #7fadf5 50.000%, #69a9e4 62.500%, #6bbad1 75.000%, #82d3d5 87.500%, #a4e5ea 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gJLgMOgN5gC4gB7gBNgOrgQrgX0gNdgNugEh?style=linearGradient&steps=9&angle=315 -->
<defs>
<linearGradient id="gradient" x1="0.854" y1="0.854" x2="0.146" y2="0.146">
<stop offset="0.000" stop-color="#b4dede" /><stop offset="0.125" stop-color="#c4e7cf" /><stop offset="0.250" stop-color="#bcdbd9" /><stop offset="0.375" stop-color="#a0c2ef" /><stop offset="0.500" stop-color="#7fadf5" /><stop offset="0.625" stop-color="#69a9e4" /><stop offset="0.750" stop-color="#6bbad1" /><stop offset="0.875" stop-color="#82d3d5" /><stop offset="1.000" stop-color="#a4e5ea" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#b4dede", "#c4e7cf", "#bcdbd9", "#a0c2ef", "#7fadf5", "#69a9e4", "#6bbad1", "#82d3d5", "#a4e5ea"]
// https://grabient.com/_gJLgMOgN5gC4gB7gBNgOrgQrgX0gNdgNugEh?style=linearGradient&steps=9&angle=315
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 9.0;
const float ANGLE = 315.0;
vec3 palette(float t) {
vec3 a = vec3(0.587, 0.782, 0.889);
vec3 b = vec3(0.184, 0.123, 0.077);
vec3 c = vec3(0.939, 1.067, 1.524);
vec3 d = vec3(0.861, 0.878, 0.289);
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.587, 0.782, 0.889],
[0.184, 0.123, 0.077],
[0.939, 1.067, 1.524],
[0.861, 0.878, 0.289]
]