/* https://grabient.com/_f9KgH-gB7f5cgGQf1vf8Vf5bgEKf5if4IgDW?style=linearSwatches&steps=10&angle=300 */
background: linear-gradient(300deg, #2d1c00 0.000%, #2d1c00 10.000%, #352119 calc(10.000% + 1px), #352119 20.000%, #3a2f38 calc(20.000% + 1px), #3a2f38 30.000%, #3d4356 calc(30.000% + 1px), #3d4356 40.000%, #3c5d72 calc(40.000% + 1px), #3c5d72 50.000%, #397a8c calc(50.000% + 1px), #397a8c 60.000%, #3298a1 calc(60.000% + 1px), #3298a1 70.000%, #29b4b3 calc(70.000% + 1px), #29b4b3 80.000%, #1eccbf calc(80.000% + 1px), #1eccbf 90.000%, #11ddc6 calc(90.000% + 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/_f9KgH-gB7f5cgGQf1vf8Vf5bgEKf5if4IgDW?style=linearSwatches&steps=10&angle=300 -->
<defs>
<clipPath id="bounds">
<rect x="0" y="0" width="800" height="400" />
</clipPath>
</defs>
<g clip-path="url(#bounds)"><path d="M 1010.209,35.907 L 562.996,810.503 L 485.675,765.862 L 932.889,-8.734 Z" fill="#2d1c00" fill-opacity="1.000" /><path d="M 932.889,-8.734 L 485.675,765.862 L 408.355,721.221 L 855.568,-53.375 Z" fill="#352119" fill-opacity="1.000" /><path d="M 855.568,-53.375 L 408.355,721.221 L 331.034,676.580 L 778.248,-98.016 Z" fill="#3a2f38" fill-opacity="1.000" /><path d="M 778.248,-98.016 L 331.034,676.580 L 253.714,631.939 L 700.927,-142.657 Z" fill="#3d4356" fill-opacity="1.000" /><path d="M 700.927,-142.657 L 253.714,631.939 L 176.393,587.298 L 623.607,-187.298 Z" fill="#3c5d72" fill-opacity="1.000" /><path d="M 623.607,-187.298 L 176.393,587.298 L 99.073,542.657 L 546.286,-231.939 Z" fill="#397a8c" fill-opacity="1.000" /><path d="M 546.286,-231.939 L 99.073,542.657 L 21.752,498.016 L 468.966,-276.580 Z" fill="#3298a1" fill-opacity="1.000" /><path d="M 468.966,-276.580 L 21.752,498.016 L -55.568,453.375 L 391.645,-321.221 Z" fill="#29b4b3" fill-opacity="1.000" /><path d="M 391.645,-321.221 L -55.568,453.375 L -132.889,408.734 L 314.325,-365.862 Z" fill="#1eccbf" fill-opacity="1.000" /><path d="M 314.325,-365.862 L -132.889,408.734 L -210.209,364.093 L 237.004,-410.503 Z" fill="#11ddc6" fill-opacity="1.000" /></g>
</svg>
["#2d1c00", "#352119", "#3a2f38", "#3d4356", "#3c5d72", "#397a8c", "#3298a1", "#29b4b3", "#1eccbf", "#11ddc6"]
// https://grabient.com/_f9KgH-gB7f5cgGQf1vf8Vf5bgEKf5if4IgDW?style=linearSwatches&steps=10&angle=300
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 10.0;
const float ANGLE = 300.0;
vec3 palette(float t) {
vec3 a = vec3(-0.182, 0.510, 0.123);
vec3 b = vec3(-0.420, 0.400, -0.657);
vec3 c = vec3(-0.235, -0.421, 0.266);
vec3 d = vec3(-0.414, -0.504, 0.214);
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.182, 0.510, 0.123],
[-0.420, 0.400, -0.657],
[-0.235, -0.421, 0.266],
[-0.414, -0.504, 0.214]
]