/* https://grabient.com/_hz6hIOgHUh0yhFYgG2gBogBogDrgG-gH3gKg?style=linearGradient&steps=21&angle=180 */
background: linear-gradient(180deg, #5e2f43 0.000%, #4b304a 5.000%, #393252 10.000%, #29365a 15.000%, #1b3b62 20.000%, #0f416a 25.000%, #054872 30.000%, #00517a 35.000%, #005b83 40.000%, #00658b 45.000%, #007193 50.000%, #007e9b 55.000%, #008da2 60.000%, #009caa 65.000%, #00acb1 70.000%, #07beb8 75.000%, #12d0bf 80.000%, #1ee4c5 85.000%, #2cf9ca 90.000%, #3dffd0 95.000%, #4fffd4 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_hz6hIOgHUh0yhFYgG2gBogBogDrgG-gH3gKg?style=linearGradient&steps=21&angle=180 -->
<defs>
<linearGradient id="gradient" x1="0.500" y1="0.000" x2="0.500" y2="1.000">
<stop offset="0.000" stop-color="#5e2f43" /><stop offset="0.050" stop-color="#4b304a" /><stop offset="0.100" stop-color="#393252" /><stop offset="0.150" stop-color="#29365a" /><stop offset="0.200" stop-color="#1b3b62" /><stop offset="0.250" stop-color="#0f416a" /><stop offset="0.300" stop-color="#054872" /><stop offset="0.350" stop-color="#00517a" /><stop offset="0.400" stop-color="#005b83" /><stop offset="0.450" stop-color="#00658b" /><stop offset="0.500" stop-color="#007193" /><stop offset="0.550" stop-color="#007e9b" /><stop offset="0.600" stop-color="#008da2" /><stop offset="0.650" stop-color="#009caa" /><stop offset="0.700" stop-color="#00acb1" /><stop offset="0.750" stop-color="#07beb8" /><stop offset="0.800" stop-color="#12d0bf" /><stop offset="0.850" stop-color="#1ee4c5" /><stop offset="0.900" stop-color="#2cf9ca" /><stop offset="0.950" stop-color="#3dffd0" /><stop offset="1.000" stop-color="#4fffd4" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#5e2f43", "#4b304a", "#393252", "#29365a", "#1b3b62", "#0f416a", "#054872", "#00517a", "#005b83", "#00658b", "#007193", "#007e9b", "#008da2", "#009caa", "#00acb1", "#07beb8", "#12d0bf", "#1ee4c5", "#2cf9ca", "#3dffd0", "#4fffd4"]
// https://grabient.com/_hz6hIOgHUh0yhFYgG2gBogBogDrgG-gH3gKg?style=linearGradient&steps=21&angle=180
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 21.0;
const float ANGLE = 180.0;
vec3 palette(float t) {
vec3 a = vec3(7.418, 4.622, 0.468);
vec3 b = vec3(7.474, 4.440, 0.438);
vec3 c = vec3(0.104, 0.104, 0.235);
vec3 d = vec3(0.446, 0.503, 0.672);
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);
}
[
[7.418, 4.622, 0.468],
[7.474, 4.440, 0.438],
[0.104, 0.104, 0.235],
[0.446, 0.503, 0.672]
]