gradients.body.sh
1 #!/usr/bin/env sh 2 3 4 5 cat << HTML 6 <style> 7 article section{display:grid; grid-template-columns: repeat(4, 1fr);} 8 img{width:100%} 9 </style> 10 <pre> 11 $(cat ~/git-clones/NUI-magick/cgi-bin/magick/gradient.magick) 12 </pre> 13 <p>Albeit being 800×600px, their blurry nature — or perhaps the default resampling 14 interpolations from our image viewers — make it so they stretch to any given 15 dimension.</p> 16 <br> 17 <section> 18 $(seq 32 |xargs printf "<img src="/i/gradients/gradient-%02d.png">\n") 19 </section> 20 21 HTML
#!/usr/bin/env sh N=$(cat <<- % | shuf | head -n 1 16 32 64 128 % ) cols=$(cat << % | shuf | head -n $N yellow green red red red $(seq 82 | while read n;do echo "grey$n";done) % ) for col in $cols; do str=$(echo "$str-$col gradient:$col") done magick $(echo $str | sed "s/^-[a-z0-9]* //g; s/gradient:[a-z0-9]*$//g")\ -append -resize 800x600\! gradient.png feh gradient.png
Albeit being 800×600px, their blurry nature — or perhaps the default resampling interpolations from our image viewers — make it so they stretch to any given dimension.