4 if [ "${n}" != 1 ]; then
8 lab
=$
(echo "${scan}" | jq
-cr '.scan.lab | join(", ")')
9 lch
=$
(echo "${scan}" | jq
-cr '.scan.lch | join(", ")')
10 rgb
=$
(echo "${scan}" | jq
-cr '.scan.rgb | join(", ")')
11 r
=$
(echo "${rgb}" | cut
-f 1 -d "," |
tr -d " ")
12 g
=$
(echo "${rgb}" | cut
-f 2 -d "," |
tr -d " ")
13 b
=$
(echo "${rgb}" | cut
-f 3 -d "," |
tr -d " ")
14 rH
=$
(printf "%x\n" ${r})
15 gH
=$
(printf "%x\n" ${g})
16 bH
=$
(printf "%x\n" ${b})
18 echo -e "\033[48;2;${r};${g};${b}m \e[0m"
23 echo "HEX: #${rH}${gH}${bH}"
25 done < <(bluecolor
--format json
)