    local regex=s/rgb:\([^/]\+\)\/\([^/]\+\)\/\([^/]\+\)/\1 \2 \3/p    local colors=$(xtermcontrol --get-bg | sed -n $regex)    local base10_colors=()    for i in 1 2 3; do        $base10_colors[i]=$((16#$colors[i]))    doneI have this for now, but this doesn't work.
How to transform array of hex into array of base10 integers?
shell script;zsh
If you have a variable with a hexadecimal number, such as 'FF00', and you want to convert it to decimal, then you may use bc:hex='FF00'dec=$( printf 'ibase=16; %s\n' $hex | bc )Here, bc will output 65280 and the shell will store that as as string in the variable dec.Setting the ibase=16 tells bc that the input base is 16 (i.e. hexadecimal).  It also has an obase variable (output base) that one could use with ibase for arbitrary conversions.If you have an array of hexadecimal values:colors=( $(xtermcontrol --get-bg | sed -n $regex) )typeset -a base10_colorsfor hex in ${colors[@]}; do  base10_colors+=( $( printf 'ibase=16; %s\n' $hex | bc ) )doneOr, with that zsh syntax:colors=( $(xtermcontrol --get-bg | sed -n $regex) )typeset -a base10_colorsfor hex in ${colors[@]}; do  base10_colors+=( $((16#$hex)) )done