/* https://grabient.com/_gJafGVfM0gIuhBZg6ngG_gBmgBigHKgOOgOK?style=linearGradient&steps=21&angle=180 */
background: linear-gradient(180deg, #100000 0.000%, #0c0000 5.000%, #0b0000 10.000%, #0d0b05 15.000%, #111a13 20.000%, #19281f 25.000%, #22352b 30.000%, #2e4037 35.000%, #3d4b41 40.000%, #4d554a 45.000%, #5e5e53 50.000%, #71665b 55.000%, #846d62 60.000%, #987268 65.000%, #ac776d 70.000%, #c07a71 75.000%, #d37c75 80.000%, #e47e77 85.000%, #f47e78 90.000%, #ff7d79 95.000%, #ff7b79 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gJafGVfM0gIuhBZg6ngG_gBmgBigHKgOOgOK?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="#100000" /><stop offset="0.050" stop-color="#0c0000" /><stop offset="0.100" stop-color="#0b0000" /><stop offset="0.150" stop-color="#0d0b05" /><stop offset="0.200" stop-color="#111a13" /><stop offset="0.250" stop-color="#19281f" /><stop offset="0.300" stop-color="#22352b" /><stop offset="0.350" stop-color="#2e4037" /><stop offset="0.400" stop-color="#3d4b41" /><stop offset="0.450" stop-color="#4d554a" /><stop offset="0.500" stop-color="#5e5e53" /><stop offset="0.550" stop-color="#71665b" /><stop offset="0.600" stop-color="#846d62" /><stop offset="0.650" stop-color="#987268" /><stop offset="0.700" stop-color="#ac776d" /><stop offset="0.750" stop-color="#c07a71" /><stop offset="0.800" stop-color="#d37c75" /><stop offset="0.850" stop-color="#e47e77" /><stop offset="0.900" stop-color="#f47e78" /><stop offset="0.950" stop-color="#ff7d79" /><stop offset="1.000" stop-color="#ff7b79" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#100000", "#0c0000", "#0b0000", "#0d0b05", "#111a13", "#19281f", "#22352b", "#2e4037", "#3d4b41", "#4d554a", "#5e5e53", "#71665b", "#846d62", "#987268", "#ac776d", "#c07a71", "#d37c75", "#e47e77", "#f47e78", "#ff7d79", "#ff7b79"]
// https://grabient.com/_gJafGVfM0gIuhBZg6ngG_gBmgBigHKgOOgOK?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(0.602, -3.691, -3.276);
vec3 b = vec3(0.558, 4.185, 3.751);
vec3 c = vec3(0.447, 0.102, 0.098);
vec3 d = vec3(0.458, 0.910, 0.906);
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.602, -3.691, -3.276],
[0.558, 4.185, 3.751],
[0.447, 0.102, 0.098],
[0.458, 0.910, 0.906]
]