I think you need to use the mqtt template light platform.
It has a command_on_template
config requirement with variables for eg red, green and blue.
So I think you could do something like this:
{{ "{0:02x}{1:02x}{2:02x}".format(red, green, blue) }}
You probably need to check that the other light controls work with that template though, ie on/off and brightness.