This will use the trim page x-offsets to sort the images so that it keeps the left to right order of the colors.
hh=`convert Bkwme.png -ping -format "%h" info:`
ww=`convert Bkwme.png -ping -format "%w" info:`
spacer=`convert xc: -format "%[fx:($ww-3*$hh)/4]" info:`
convert Bkwme.png \
\( -clone 0 -fuzz 1% +transparent "#339966" -trim -write Bkwme_1.png \) \
\( -clone 0 -fuzz 1% +transparent "#FFCC00" -trim -write Bkwme_2.png \) \
\( -clone 0 -fuzz 1% +transparent "#CCFFCC" -trim -write Bkwme_3.png \) \
-delete 0 null:
xx1=`convert Bkwme_1.png -ping -format "%[fx:page.x]" info:`
xx2=`convert Bkwme_2.png -ping -format "%[fx:page.x]" info:`
xx3=`convert Bkwme_3.png -ping -format "%[fx:page.x]" info:`
list1="Bkwme_1.png $xx1
Bkwme_2.png $xx2
Bkwme_3.png $xx3"
list2=`echo "$list1" | sort -k 2`
img1=`echo $list2 | cut -d\ -f1`
img2=`echo $list2 | cut -d\ -f3`
img3=`echo $list2 | cut -d\ -f5`
convert -size ${ww}x${hh} xc:white \
$img1 +repage -background none -gravity center -extent x$hh -gravity west -geometry +$spacer+0 -composite \
$img2 +repage -background none -gravity center -extent x$hh -gravity center -composite \
$img3 +repage -background none -gravity center -extent x$hh -gravity east -geometry +$spacer+0 -composite \
Bkwme_composite.png
rm -f $img1 $img2 $img3