Obviously there can be more options, like borders and etc, but if you just want an image of width x height of a given hex color, it’s pretty straight forward.
Here’s all it takes to make an 100×100 image of a solid dark red:
convert -size 100x100 xc:#990000 whatever.png