Skip to content

Commit 37c25a9

Browse files
Netherwhalspoutn1k
authored andcommitted
Add 1.20.1 colors
1 parent efdc59e commit 37c25a9

File tree

2 files changed

+110
-35
lines changed

2 files changed

+110
-35
lines changed

scripts/average.sh

100644100755
+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
#!/usr/bin/env bash
2+
13
# Requires ImageMagick
24
# Outputs the color average of the image passed as an argument
35

4-
echo -ne "`basename "$1"`\t"
5-
convert "$1" -resize 1x1 txt:- | grep -Po "#[[:xdigit:]]{6}" | tr A-F a-f
6+
set -eo pipefail
7+
8+
printf '%s\t%s\n' \
9+
"$(basename "${1}")" \
10+
"$(convert "${1}" -resize 1x1 txt:- | grep -Po "#[[:xdigit:]]{6}" | tr A-F a-f)"

0 commit comments

Comments
 (0)