/* https://grabient.com/_gFVgEvgClgLFgIDgFygNggN1gMRgHSgIIgp7gAn0uHQY?style=linearGradient&steps=15&angle=90 */
background: linear-gradient(90deg, #000c17 0.000%, #001325 7.143%, #072234 14.286%, #1a3642 21.429%, #354d4e 28.571%, #546456 35.714%, #737859 42.857%, #8f8758 50.000%, #a48e52 57.143%, #af8d48 64.286%, #b0853c 71.429%, #a6752d 78.571%, #93601e 85.714%, #784810 92.857%, #593205 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gFVgEvgClgLFgIDgFygNggN1gMRgHSgIIgp7gAn0uHQY?style=linearGradient&steps=15&angle=90 -->
<defs>
<linearGradient id="gradient" x1="0.000" y1="0.500" x2="1.000" y2="0.500">
<stop offset="0.000" stop-color="#000c17" /><stop offset="0.071" stop-color="#001325" /><stop offset="0.143" stop-color="#072234" /><stop offset="0.214" stop-color="#1a3642" /><stop offset="0.286" stop-color="#354d4e" /><stop offset="0.357" stop-color="#546456" /><stop offset="0.429" stop-color="#737859" /><stop offset="0.500" stop-color="#8f8758" /><stop offset="0.571" stop-color="#a48e52" /><stop offset="0.643" stop-color="#af8d48" /><stop offset="0.714" stop-color="#b0853c" /><stop offset="0.786" stop-color="#a6752d" /><stop offset="0.857" stop-color="#93601e" /><stop offset="0.929" stop-color="#784810" /><stop offset="1.000" stop-color="#593205" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#000c17", "#001325", "#072234", "#1a3642", "#354d4e", "#546456", "#737859", "#8f8758", "#a48e52", "#af8d48", "#b0853c", "#a6752d", "#93601e", "#784810", "#593205"]
// https://grabient.com/_gFVgEvgClgLFgIDgFygNggN1gMRgHSgIIgp7gAn0uHQY?style=linearGradient&steps=15&angle=90
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 15.0;
const float ANGLE = 90.0;
vec3 palette(float t) {
vec3 a = vec3(0.341, 0.303, 0.165);
vec3 b = vec3(0.354, 0.258, 0.185);
vec3 c = vec3(0.780, 0.799, 0.709);
vec3 d = vec3(-0.534, -0.480, 1.683);
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.341, 0.303, 0.165],
[0.354, 0.258, 0.185],
[0.780, 0.799, 0.709],
[-0.534, -0.480, 1.683]
]