/* https://grabient.com/_ggEgbggE6gd3gZTgCjgBmgBggI-gH8gH4gIC?style=linearGradient&steps=21&angle=135 */
background: linear-gradient(135deg, #252427 0.000%, #262528 5.000%, #27252b 10.000%, #29272e 15.000%, #2c2833 20.000%, #2f2a39 25.000%, #322d40 30.000%, #362f47 35.000%, #3b334e 40.000%, #403656 45.000%, #453a5d 50.000%, #4b3e64 55.000%, #51426a 60.000%, #584770 65.000%, #5f4d74 70.000%, #675277 75.000%, #6f5879 80.000%, #785e7a 85.000%, #816579 90.000%, #8a6c77 95.000%, #947373 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_ggEgbggE6gd3gZTgCjgBmgBggI-gH8gH4gIC?style=linearGradient&steps=21&angle=135 -->
<defs>
<linearGradient id="gradient" x1="0.146" y1="0.146" x2="0.854" y2="0.854">
<stop offset="0.000" stop-color="#252427" /><stop offset="0.050" stop-color="#262528" /><stop offset="0.100" stop-color="#27252b" /><stop offset="0.150" stop-color="#29272e" /><stop offset="0.200" stop-color="#2c2833" /><stop offset="0.250" stop-color="#2f2a39" /><stop offset="0.300" stop-color="#322d40" /><stop offset="0.350" stop-color="#362f47" /><stop offset="0.400" stop-color="#3b334e" /><stop offset="0.450" stop-color="#403656" /><stop offset="0.500" stop-color="#453a5d" /><stop offset="0.550" stop-color="#4b3e64" /><stop offset="0.600" stop-color="#51426a" /><stop offset="0.650" stop-color="#584770" /><stop offset="0.700" stop-color="#5f4d74" /><stop offset="0.750" stop-color="#675277" /><stop offset="0.800" stop-color="#6f5879" /><stop offset="0.850" stop-color="#785e7a" /><stop offset="0.900" stop-color="#816579" /><stop offset="0.950" stop-color="#8a6c77" /><stop offset="1.000" stop-color="#947373" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#252427", "#262528", "#27252b", "#29272e", "#2c2833", "#2f2a39", "#322d40", "#362f47", "#3b334e", "#403656", "#453a5d", "#4b3e64", "#51426a", "#584770", "#5f4d74", "#675277", "#6f5879", "#785e7a", "#816579", "#8a6c77", "#947373"]
// https://grabient.com/_ggEgbggE6gd3gZTgCjgBmgBggI-gH8gH4gIC?style=linearGradient&steps=21&angle=135
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 21.0;
const float ANGLE = 135.0;
vec3 palette(float t) {
vec3 a = vec3(2.052, 1.760, 0.314);
vec3 b = vec3(1.911, 1.619, 0.163);
vec3 c = vec3(0.102, 0.096, 0.574);
vec3 d = vec3(0.508, 0.504, 0.514);
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);
}
[
[2.052, 1.760, 0.314],
[1.911, 1.619, 0.163],
[0.102, 0.096, 0.574],
[0.508, 0.504, 0.514]
]