pastel - scripts - various script and utils
HTML git clone git://z3bra.org/scripts
DIR Log
DIR Files
DIR Refs
---
pastel (389B)
---
1 #!/bin/sh
2
3 r_dark="0 96"
4 r_light="170 240"
5
6 usage() {
7 echo "usage: $(basename $0) [-dl] [-m dark|light]" >&2
8 }
9
10 while getopts "hdlm:" OPT; do
11 case $OPT in
12 d) mood="dark";;
13 l) mood="light";;
14 m) mood="$OPTARG";;
15 h) usage; exit 0;;
16 *) usage; exit 1;;
17 esac
18 done
19
20 [ "$mood" = "dark" ] && range=$r_dark || range=$r_light
21
22 printf '#%s\n' "$(seq $range|shuf|head -n3|xargs printf '%02x')"