Can you post an example of these color images. Are they a solid color?
The general idea is to get the average color of the image, save it to a string variable, then use that variable in +level-colors.
For unix/mac osx, one would do the following (but it will be different for Windows)
colorval=`convert colorimage -scale 1x1\! -format "%[pixel: u.p{0,0}]" info:`
This averages the image down to one pixel and so gives the average color if it is not perfectly uniform. However, if the color is perfectly uniform, then the -scale step can be ignored.
colorval=`convert colorimage -format "%[pixel: u.p{0,0}]" info:`
see
http://www.imagemagick.org/Usage/transform/#fx_escapes
now put that into your +level-colors
convert grayscaleimage +level-colors "black,$colorval" resultcolorized
Note the escape \ on the ! is to make sure you get only 1pixel.
The quotes on the "black,$colorval" are needed to allow the variable to be used and to ensure that you get the color result as either a name or an rgb(...) value.
If I misunderstand what you are trying to do, then please post an example of your color images and explain further.