/* https://grabient.com/_gXDgUYgEIgWsgThgA_gBkgBzgapgIrgIZgGF?style=linearGradient&steps=18&angle=135 */
background: linear-gradient(135deg, #1c1737 0.000%, #211a33 5.882%, #261e36 11.765%, #2c223d 17.647%, #322747 23.529%, #392d50 29.412%, #403353 35.294%, #473a51 41.176%, #4f4149 47.059%, #58483f 52.941%, #615037 58.824%, #6a5933 64.706%, #736236 70.588%, #7d6b3e 76.471%, #877548 82.353%, #927f50 88.235%, #9d8a53 94.118%, #a89551 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gXDgUYgEIgWsgThgA_gBkgBzgapgIrgIZgGF?style=linearGradient&steps=18&angle=135 -->
<defs>
<linearGradient id="gradient" x1="0.146" y1="0.146" x2="0.854" y2="0.854">
<stop offset="0.000" stop-color="#1c1737" /><stop offset="0.059" stop-color="#211a33" /><stop offset="0.118" stop-color="#261e36" /><stop offset="0.176" stop-color="#2c223d" /><stop offset="0.235" stop-color="#322747" /><stop offset="0.294" stop-color="#392d50" /><stop offset="0.353" stop-color="#403353" /><stop offset="0.412" stop-color="#473a51" /><stop offset="0.471" stop-color="#4f4149" /><stop offset="0.529" stop-color="#58483f" /><stop offset="0.588" stop-color="#615037" /><stop offset="0.647" stop-color="#6a5933" /><stop offset="0.706" stop-color="#736236" /><stop offset="0.765" stop-color="#7d6b3e" /><stop offset="0.824" stop-color="#877548" /><stop offset="0.882" stop-color="#927f50" /><stop offset="0.941" stop-color="#9d8a53" /><stop offset="1.000" stop-color="#a89551" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#1c1737", "#211a33", "#261e36", "#2c223d", "#322747", "#392d50", "#403353", "#473a51", "#4f4149", "#58483f", "#615037", "#6a5933", "#736236", "#7d6b3e", "#877548", "#927f50", "#9d8a53", "#a89551"]
// https://grabient.com/_gXDgUYgEIgWsgThgA_gBkgBzgapgIrgIZgGF?style=linearGradient&steps=18&angle=135
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 18.0;
const float ANGLE = 135.0;
vec3 palette(float t) {
vec3 a = vec3(1.475, 1.304, 0.264);
vec3 b = vec3(1.452, 1.249, 0.063);
vec3 c = vec3(0.100, 0.115, 1.705);
vec3 d = vec3(0.555, 0.537, 0.389);
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);
}
[
[1.475, 1.304, 0.264],
[1.452, 1.249, 0.063],
[0.100, 0.115, 1.705],
[0.555, 0.537, 0.389]
]