/* https://grabient.com/_gNGgMzgNLgCugCZgChgRJgLjgPPgAzgHCgKZ?style=linearSwatches&steps=8&angle=0 */
background: linear-gradient(0deg, #ffacc2 0.000%, #ffacc2 12.500%, #e1ace5 calc(12.500% + 1px), #e1ace5 25.000%, #b8bcfd calc(25.000% + 1px), #b8bcfd 37.500%, #aad5fb calc(37.500% + 1px), #aad5fb 50.000%, #c2ecde calc(50.000% + 1px), #c2ecde 62.500%, #ecf7bd calc(62.500% + 1px), #ecf7bd 75.000%, #fff3ae calc(75.000% + 1px), #fff3ae 87.500%, #f0dfbd calc(87.500% + 1px) 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gNGgMzgNLgCugCZgChgRJgLjgPPgAzgHCgKZ?style=linearSwatches&steps=8&angle=0 -->
<defs>
<clipPath id="bounds">
<rect x="0" y="0" width="800" height="400" />
</clipPath>
</defs>
<g clip-path="url(#bounds)"><path d="M 847.214,400.000 L -47.214,400.000 L -47.214,350.000 L 847.214,350.000 Z" fill="#ffacc2" fill-opacity="1.000" /><path d="M 847.214,350.000 L -47.214,350.000 L -47.214,300.000 L 847.214,300.000 Z" fill="#e1ace5" fill-opacity="1.000" /><path d="M 847.214,300.000 L -47.214,300.000 L -47.214,250.000 L 847.214,250.000 Z" fill="#b8bcfd" fill-opacity="1.000" /><path d="M 847.214,250.000 L -47.214,250.000 L -47.214,200.000 L 847.214,200.000 Z" fill="#aad5fb" fill-opacity="1.000" /><path d="M 847.214,200.000 L -47.214,200.000 L -47.214,150.000 L 847.214,150.000 Z" fill="#c2ecde" fill-opacity="1.000" /><path d="M 847.214,150.000 L -47.214,150.000 L -47.214,100.000 L 847.214,100.000 Z" fill="#ecf7bd" fill-opacity="1.000" /><path d="M 847.214,100.000 L -47.214,100.000 L -47.214,50.000 L 847.214,50.000 Z" fill="#fff3ae" fill-opacity="1.000" /><path d="M 847.214,50.000 L -47.214,50.000 L -47.214,-0.000 L 847.214,0.000 Z" fill="#f0dfbd" fill-opacity="1.000" /></g>
</svg>
["#ffacc2", "#e1ace5", "#b8bcfd", "#aad5fb", "#c2ecde", "#ecf7bd", "#fff3ae", "#f0dfbd"]
// https://grabient.com/_gNGgMzgNLgCugCZgChgRJgLjgPPgAzgHCgKZ?style=linearSwatches&steps=8&angle=0
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 8.0;
const float ANGLE = 0.0;
vec3 palette(float t) {
vec3 a = vec3(0.838, 0.819, 0.843);
vec3 b = vec3(0.174, 0.153, 0.161);
vec3 c = vec3(1.097, 0.739, 0.975);
vec3 d = vec3(0.051, 0.450, 0.665);
return a + b * cos(6.283185 * (c * t + d));
}
// N hard swatches sampled from the palette
vec3 stops(float t) {
float i = min(floor(clamp(t, 0.0, 1.0) * STEPS), STEPS - 1.0);
return palette(i / (STEPS - 1.0));
}
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.838, 0.819, 0.843],
[0.174, 0.153, 0.161],
[1.097, 0.739, 0.975],
[0.051, 0.450, 0.665]
]