/* https://grabient.com/_gHlgJ0gDgf7Yf7CgHyf7zf5kgCwgxFgUufwVgAvovoeF?style=linearGradient&steps=15&angle=210 */
background: linear-gradient(210deg, #318992 0.000%, #307b99 7.143%, #316e9f 14.286%, #3363a5 21.429%, #355aaa 28.571%, #3954ae 35.714%, #3e50b2 42.857%, #444fb5 50.000%, #4a51b6 57.143%, #5155b8 64.286%, #595cb8 71.429%, #6165b8 78.571%, #6a71b7 85.714%, #737db5 92.857%, #7c8bb2 100.000%);
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400" preserveAspectRatio="none">
<!-- https://grabient.com/_gHlgJ0gDgf7Yf7CgHyf7zf5kgCwgxFgUufwVgAvovoeF?style=linearGradient&steps=15&angle=210 -->
<defs>
<linearGradient id="gradient" x1="0.750" y1="0.067" x2="0.250" y2="0.933">
<stop offset="0.000" stop-color="#318992" /><stop offset="0.071" stop-color="#307b99" /><stop offset="0.143" stop-color="#316e9f" /><stop offset="0.214" stop-color="#3363a5" /><stop offset="0.286" stop-color="#355aaa" /><stop offset="0.357" stop-color="#3954ae" /><stop offset="0.429" stop-color="#3e50b2" /><stop offset="0.500" stop-color="#444fb5" /><stop offset="0.571" stop-color="#4a51b6" /><stop offset="0.643" stop-color="#5155b8" /><stop offset="0.714" stop-color="#595cb8" /><stop offset="0.786" stop-color="#6165b8" /><stop offset="0.857" stop-color="#6a71b7" /><stop offset="0.929" stop-color="#737db5" /><stop offset="1.000" stop-color="#7c8bb2" />
</linearGradient>
</defs>
<rect x="0" y="0" width="800" height="400" fill="url(#gradient)" />
</svg>
["#318992", "#307b99", "#316e9f", "#3363a5", "#355aaa", "#3954ae", "#3e50b2", "#444fb5", "#4a51b6", "#5155b8", "#595cb8", "#6165b8", "#6a71b7", "#737db5", "#7c8bb2"]
// https://grabient.com/_gHlgJ0gDgf7Yf7CgHyf7zf5kgCwgxFgUufwVgAvovoeF?style=linearGradient&steps=15&angle=210
// cosine gradient palette — https://iquilezles.org/articles/palettes/
const float STEPS = 15.0;
const float ANGLE = 210.0;
vec3 palette(float t) {
vec3 a = vec3(0.485, 0.628, 0.224);
vec3 b = vec3(-0.296, -0.318, 0.498);
vec3 c = vec3(-0.269, -0.412, 0.176);
vec3 d = vec3(3.018, 1.203, -1.126);
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.485, 0.628, 0.224],
[-0.296, -0.318, 0.498],
[-0.269, -0.412, 0.176],
[3.018, 1.203, -1.126]
]