macOS: saving images from the clipboard using `pngpaste` is faded and white
Using these instead works fine:
function pngpaste() {
    local name=&quot;${1}&quot;
    ensure-args name @MRET
    ensure isDarwin @MRET

    [[ &quot;$name&quot; =~ '\.png$' ]] || name+=.png

    osascript -e &quot;tell application \&quot;System Events\&quot; to ¬
                  write (the clipboard as «class PNGf») to ¬
                          (make new file at folder \&quot;$(pwd)\&quot; with properties ¬
                                  {name:\&quot;${name}\&quot;})&quot;
}
function jpgpaste() {
    local name=&quot;${1}&quot;
    ensure-args name @MRET
    ensure isDarwin @MRET


    [[ &quot;$name&quot; =~ '\.jpg$' ]] || name+=.jpg

    osascript -e &quot;tell application \&quot;System Events\&quot; to ¬
                  write (the clipboard as JPEG picture) to ¬
                          (make new file at folder \&quot;$(pwd)\&quot; with properties ¬
                                  {name:\&quot;${name}\&quot;})&quot;
}

Usage:
pngpaste a1.png