/* https://grabient.com/_gCpgEwgG3f93f8-f8kgH0gH0gH0gAAgAAgAA?style=linearGradient&steps=16&angle=0 */
background: linear-gradient(0deg, #081c38 0.000%, #091d39 6.667%, #0b203d 13.333%, #0f2543 20.000%, #142c4a 26.667%, #1a3554 33.333%, #203e5f 40.000%, #27486a 46.667%, #2f5376 53.333%, #365d81 60.000%, #3d668c 66.667%, #426f95 73.333%, #47769d 80.000%, #4b7ba3 86.667%, #4d7ea7 93.333%, #4e7fa8 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gCpgEwgG3f93f8-f8kgH0gH0gH0gAAgAAgAA?style=linearGradient&steps=16&angle=0 -->
<defs>
<linearGradient id="gradient" x1="0.500" y1="1.000" x2="0.500" y2="0.000">
<stop offset="0.000" stop-color="#081c38" /><stop offset="0.067" stop-color="#091d39" /><stop offset="0.133" stop-color="#0b203d" /><stop offset="0.200" stop-color="#0f2543" /><stop offset="0.267" stop-color="#142c4a" /><stop offset="0.333" stop-color="#1a3554" /><stop offset="0.400" stop-color="#203e5f" /><stop offset="0.467" stop-color="#27486a" /><stop offset="0.533" stop-color="#2f5376" /><stop offset="0.600" stop-color="#365d81" /><stop offset="0.667" stop-color="#3d668c" /><stop offset="0.733" stop-color="#426f95" /><stop offset="0.800" stop-color="#47769d" /><stop offset="0.867" stop-color="#4b7ba3" /><stop offset="0.933" stop-color="#4d7ea7" /><stop offset="1.000" stop-color="#4e7fa8" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#081c38", "#091d39", "#0b203d", "#0f2543", "#142c4a", "#1a3554", "#203e5f", "#27486a", "#2f5376", "#365d81", "#3d668c", "#426f95", "#47769d", "#4b7ba3", "#4d7ea7", "#4e7fa8"]
// https://grabient.com/_gCpgEwgG3f93f8-f8kgH0gH0gH0gAAgAAgAA?style=linearGradient&steps=16&angle=0
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 16.0;
const float ANGLE = 0.0;
vec3 palette(float t) {
vec3 a = vec3(0.169, 0.304, 0.439);
vec3 b = vec3(-0.137, -0.194, -0.220);
vec3 c = vec3(0.500, 0.500, 0.500);
vec3 d = vec3(0.000, 0.000, 0.000);
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.169, 0.304, 0.439],
[-0.137, -0.194, -0.220],
[0.500, 0.500, 0.500],
[0.000, 0.000, 0.000]
]